yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Themes and Apps] rajendra82:
You are making thing way harder and more ambitions they need to be. We have a display meant for humans. All content you consume of this display is encoded in a gamma 2.2 format. The display needs to be around gamma 2.2 to show these images properly, because all other displays around you are also gamma 2.2 or thereabouts. The display tester app testing shows that our display is around gamma 2.0, so it's a little more washed out, but it is a normal working display that follows normal sRGB encoding laws. The values in the register array are not a color curve, but a look up table that is translated to color curve on your screen. Based on the latest @mag01 testing we have some idea about what values in the look table do what and how sensitive the colors are to the changes in register values.

Lets say we wanted to go from the actual gamma of 2.0 to a gamma of 2.2. We can transform the sRGB 2.0 gamma to a sRGB 2.2 gamma curve. We know what the amount of change at each color curve level based on the transformation we wanted, but we don't exactly know what the actual register value changes are at need in the lookup table to have this transformation happen on the screen. We know either increasing or decreasing them will move us towards our target response. So best we can do is calculate a new look up table, put it on our display and see if it worked, or did we over or under correct. I don't care if the values are reversed or not. I wrote the spreadsheet the same way as the lookup table is built, so my macros for import and export will be easier to write for me. That's the way I prefer it. It may not be standard, but everything we are doing is non standard.

We are not writing an image editing software (at least I am not). We are writing a lookup table editing software. The closest physical analogy I can give you is controls on a television. You have your standard contrast, brightness, and color and hue controls. The controls don't analyze every frame of every scene and perfect it, they take the sRGB curve and transform it, contrast steepens it, brightness adds to it, hue changes the color balance, while color adds or reduces saturation. The spreadsheet sliders I built are my best attempt to create a similar type control scheme but to build preset lookup tables, because we can't control our display curve real time. The television also comes with movie mode, vivid mode, game mode presets. This is what the profiles are. The full gamut profiles like Sammy4 I built are the vivid mode, inaccurate but popping. The stock preset is more like a normal mode, works fine in most cases. The mag01 preset is like movie mode. This follows the standard sRGB colors the best it can. With the available data I am afraid this is the best I can do. If I had six months to do full testing, I suppose I could come up with a full range of values for the registers and how to use them to build predictable controls, but by that time Nexus 5 will be obsolete, and most will have moved on to a Nexus 6.
[Nexus 5 Themes and Apps] yorici:
Yes, I'm implying that I want to redo the calibration ORISE did. But it's actually not that hard. We find out if the linear curve is being gamma corrected. If it is, we use that as base curve. Then we just do all the mathematical shizzle we are doing now. If it is linear, we can actually use presets from photoshop, which saves us time and effort. Then if we have the mathematical formula's, Franco, myfluxi or faux could create an app. The user only requires to calibrate his own screen, the presets get calculated from the differences he made relative to the linear curve. We could actually have this done in a week with this process except for the app once we know if the base curve should be linear or exponential. We already have a lot of knowledge of how this works for the mathematical formulas. And we already have a lot of spreadsheets. You can even use the already existing ones: Now we use stock values as base curve, later our linear basecurve (IF it is linear..)

If we succeed, we have developed a general way to calibrate and have presets.

And I requested to standardize in order to use the photoshop presets more easily. The scientific world uses this order, Adobe uses this order, everybody should use this order. It's like metric vs imperial. Everybody should use metric as it used in the scientific world. So please use it, it will save time in the long run.

Right now we have 50+ profiles for 50+ screens. It's not a solution as your screen will be different in 6 months and is already different from the rest.

P.S.: I do this for the puzzle. This is a very hard puzzle, but we make progress in solving it.
[Nexus 5 Themes and Apps] rajendra82:
The base color curve is gamma power curve with a linear tail near black, just like it is for every sRGB display. The lookup table data is not a color curve. It is used to create them. It could fit linear, power, log, whatever.
[Nexus 5 Themes and Apps] yorici:
If we assume the register we edit is a LUT, then the base is linear. Then why were you doing difficult stuff with a linear tail if you already know this? If the display is correct and the register is a LUT, Google should already be using that.
[Nexus 5 Themes and Apps] rajendra82:
Because I am trying to figure it out just like you are. It's all trial and error, mostly error on our part. So far there is no reliable method we can use to change the lookup table except in a narrow range of stock. Or we can come from the other end and see what the gamma ends up with different values in the table. With more testing data, more control may be possible.
[Nexus 5 Themes and Apps] yorici:
I'm gonna try to rebuild the presets of photoshop tomorrow now I know for sure that the LUT curve should be linear. I'm anxious to know if the presets work 1:1 on our device.

How did you determine which colorrange value x affects? (Take x=2 for example)
[Nexus 5 Themes and Apps] JaylanPHNX:
Is there a popcorn smiley? This is heating up. ;)

Sent from my Slim Nexus 5 with smoothness by Faux.
[Nexus 5 Themes and Apps] rajendra82:
The answer to that is in this post.
[Nexus 5 Themes and Apps] yorici:
I actually wanted to know how we, without a colorimeter, could test it. But based on mag01 result I took ((#/24)^2,2)*100 for percentage

See upload for results.
[Nexus 5 Themes and Apps] yorici:
I have tried creating the presets of photoshop. They work as expected, but I'm bit in a hassle when it comes to the maths. This kind of curve should I get. https://s3.amazonaws.com/pbblogassets/uploads/2012/06/Adobe-Premiere-Pro-Curves.jpg

I'm thinking of sinus or x^3, but the main problem is that the curve is not intersecting the y=x line at 50%, but at ~62%. Can you think of a solution?

Darker just needs to be below the curve, and lighter above the curve. That could be done with a little exponential function.
[Nexus 5 Themes and Apps] rajendra82:
We can't test it. Small changes produce predictable results, but our eyes can't see them. Large changes produces visible but unpredictable results.
[Nexus 5 Themes and Apps] yorici:
I know. But this is kind of logical and matches mag01's results
[Nexus 5 Themes and Apps] rajendra82:
That's fine to use that relationship. Might be better than the one I chose for all I know.
[Nexus 5 Themes and Apps] Globespy:
kernel support

Am I correct in assuming that this app will only work with the old betas, last (I think) beta 04b6?

I used the app but it won't work beyond that kernel, despite 08m being one of the best battery kernels I think you've ever put out.

Any plans to make the app work with your latest 08 kernel?

Cheers Paul
[Nexus 5 Themes and Apps] GUGUITOMTG4:
read page 94.
[Nexus 5 Themes and Apps] gpvecchi:
I'm back on trying to calibrate... Even with last drivers, first 13 values act opposite as the others? Thanks...
[Nexus 5 Themes and Apps] yorici:
Yeah, this was already known two months ago. Mag01 came up with this. I suggest reading the mag01's posts on this thread. The registervalues are a Lookup table(LUT).
[Nexus 5 Themes and Apps] ReAlives:
I couldn't get this to work.. Using the latest franco kernel r32, it said "warning : this kernel has older incompatible Kernel driver, please update To the latest kernel"

Op says it works with franco kernel... Odd
[Nexus 5 Themes and Apps] yorici:
Revert to v10 of the app or to faux kernel. And search before you post please. Moreover, you probably want to be in the Franco Kernel Thread. And read this FAQ first.
[Nexus 5 Themes and Apps] rajendra82:
Actually you also need to revert to an older version of the Franco kernel too. I think r30 was the last one that worked correctly with v10 of the app. When r33 of the kernel comes out of testing, it will use the stable sysfs path for storage of the register values, so it will start working with this app again. In the meantime, use the beta FKU app with color control, or the Nexus Display Control app. Both of those use the Franco hack code to work with both the old style path and the new path.
[Nexus 5 Themes and Apps] yorici:
r31 works for me. R32 perhaps not. But he should use the nexus app anyways. Have you had any progress as so far? I might have a formula for contrast: a sigmoid curve
[Nexus 5 Themes and Apps] DowntownJeffBrown:
Finally.... :D

Been looking forward to this

>^.^< Sent From Meow nexus5
[Nexus 5 Themes and Apps] myfluxi:
:good::good::good:
[Nexus 5 Themes and Apps] resynx:
Great work Faux! Excited to start tweaking my screen again :D Don't know anything about kernels or the 'common sys interface' or any of that jazz :silly: So what would I have to ask of my kernel dev to add to his kernel for this to work? Thanks! :good:
[Nexus 5 Themes and Apps] faux123:
cherry pick the commits from my repo
[Nexus 5 Themes and Apps] tkoreaper:
What are you using to check the gamma level of your screen? You say it's at 2.2, but everything I've looked at suggests otherwise and I'm using the settings from the 2nd post. Is there anything you could learn from Franco since he has color settings in his kernel?
[Nexus 5 Themes and Apps] JNewms:
Franco is using the exact same color code. Right now everyone is trying to figure out what these values all mean.
[Nexus 5 Themes and Apps] franciscofranco:
I'm using the same display gamma hack as faux is, it was developed by [MENTION=4152171]myfluxi[/MENTION] so there's nothing I can give that has already been given from [MENTION=4152171]myfluxi[/MENTION]
[Nexus 5 Themes and Apps] evonc:
I tested the values in Display Tester and it was awfully close to 2.2 +/- 0.05 at all values. Then again, all panels aren't the same so you may be off by a fair bit.
[Nexus 5 Themes and Apps] Empty Hand:
I'm running Franco's latest test kernel. I get a FC when trying to swipe passed Gamma 3 Settings. Any suggestions?
[Nexus 5 Themes and Apps] franciscofranco:
Faux hasn't probably updated his app according to myfluxi's latest commits. Best you can do is get a logcat of the FC and pastie.org the crash so that he can fix it.
[Nexus 5 Themes and Apps] nyyankees1237:
Deleted
[Nexus 5 Themes and Apps] faux123:
APK 1.0.9 released:

Sync'ed with new gamma driver from myfluxi

added action bar for quicker navigation

added old kernel driver detection

Have fun.
[Nexus 5 Themes and Apps] parmend:
I don't have gamma 5
[Nexus 5 Themes and Apps] kenkiller:
It's renamed to white point.
[Nexus 5 Themes and Apps] The Gingerbread Man:
Just for Info's about the app swiping through the pages isn't changing the tab accrosd the the top. Stupid tapatalk won't allow me to attach image, sorry.
[Nexus 5 Themes and Apps] Fille84:
For me it doesnt seem to work poperly, it works sometimes but most of the times i doesnt change when i hit apply..
[Nexus 5 Themes and Apps] TrainNanpaMaster:
It changes just fine, but it simply doesn't stick. If I lock my phone, then come back to it a short while later, the colors revert back r15 initial settings.
[Nexus 5 Themes and Apps] 75markus:
for those running franco kernel and want their stock colors back :

change the kgamma_1 section's first value from 119 to 255 - you have stock colors back :)
[Nexus 5 Themes and Apps] Yakandu:
To be sure, can you attach screenshots of these configurations in the app? Maybe you can put them in an /spoiler... I don't want to break anything XD

PD: I dont say its difficult to do it, but for an example in Gama red control we will hace a 83-113-112 scalation and i dont think thats very logical (i think it must be crescent, right?)
[Nexus 5 Themes and Apps] myfluxi:
I'm discussing the final specs with faux atm. This will make the interface leaner and cleaner and will avoid bad (well, let's say the worst) user input. Then faux, franco and everybody can implement it in their apps and maybe add better usability with sliders or something. The next steps would be more feedback from qualified users and good presets for everyone.
[Nexus 5 Themes and Apps] sjondenon:
Does the screen calibration fix the problem of a yellowish hue (e.g. yellow whites) over the screen?
[Nexus 5 Themes and Apps] Pretoriano80:
Many users reported positive results, but you have to find a colour profile that suits you best.

Edit: Btw, you can use this app - http://xdaforums.com/showthread.php?p=45091387 - to apply various colour presets.
[Nexus 5 Themes and Apps] yorici:
Yes! You can do anything to your display. You can make it green if you want. But use the search button in Francos Thread for the profiles. Don't try to find it here. You probably want to look at this: http://xdaforums.com/showpost.php?p=49561443&postcount=13757

Then search profile in Francos thread.
[Nexus 5 Themes and Apps] sirbanger:
Try my profile in the color control app (Banged_Up). My aim was to get rid of the yellows and make it a cooler white.
[Nexus 5 Themes and Apps] fireproofrev:
Hope there will be an app with an internal algorithmic soon (so there is no need to change every value and take care of the gamma curve). So far I am happy with my settings, also tried every profile in francos app. Also it seems that with francos app you can just edit two values and we already know the explanation from post #2 (about curve and color brightness values) is not correct.
[Nexus 5 Themes and Apps] yorici:
Franco's app was just the first version. When I (or someone else) gets the formulas right, we are set to go. I'm busy atm, so the community has to wait. When there is an algorithm you would still need to change the curve yourself. But just with sliders then. Though I think the community is only obsessed with gamma, and gamma is really easy to upgrade without changing contrast or saturation too much. It does change the colour balance though..

I do have had some progress with the contrast. If you understand;) : I needed to create a S curve, so now I have this:

a * sin(2Pi/255(x-b)) + x. This will create a S-curve and the 'a' stands for amplitude. This can increase the curving of the S shape. It's not perfect, but it's something. I need to test it more, but like I said, not much time. So have patience :)
[Nexus 5 Themes and Apps] rajendra82:
Franco's app can't edit all the values. It can however load a profile with all the values very easily. Something that this app can't do.
[Nexus 5 Themes and Apps] gpvecchi:
Back again after some testing. Well, stock curves are correct, but gamma is not.

Adding 3 to first 12 values and removing it from the others (for all colors) is what is best for my display. It's a little too low, but for is far too much.

The only problem is the blue level that can't be corrected as there is no blu level but just gamma , so still the yellow tint.

White point (that is not the white point) set at 32.
[Nexus 5 Themes and Apps] yorici:
What do you mean when you say blue level can't be corrected?
[Nexus 5 Themes and Apps] k4r70ng:
Any profiles that looks bright even at lower brightness?
[Nexus 5 Themes and Apps] yorici:
I made a profile based on a linear curve for that. The colors tend to wash out. This profile is way too much on my phone, but you can check out the profile. Load it in excel, check what I did, then do the same, but less.

Profile:

https://docs.google.com/file/d/0B2xJTwDD4MzhVHF5dVA2aEVVT2c/edit?usp=docslist_api

When I finally get some spare time, I will create a spreadsheet that allows this kind of settings. Not only lighter, also contrast, saturation etc.
[Nexus 5 Themes and Apps] gpvecchi:
Blue level is blue level. 0-255. Gamma is another thing, it refers to halftones. You can have 2.22 gamma curve on all gradients with all colors, but a dominance of blue, red or green.

You can correct gamma with contrast and brightness, but this will not affect color levels.
[Nexus 5 Themes and Apps] 0rigin:
Well you can still adjust it with the white point and move it towards the yellow or the blue spectre. I'm pretty satisfied with my screen now and the yellow hue is less obvious than with stock.
[Nexus 5 Themes and Apps] yorici:
I have not been able yet to adjust the colour balance without affecting gamma and vice versa. How do you decrease blue without changing gamma mathematically speaking?
[Nexus 5 Themes and Apps] gpvecchi:
No, the "white point" value is really not white point, it is contrast.

That's exactly the point. I don't know how mathematically is, but they are 2 different things. I'll make some other tests, but I think that is something related to positive/negative values...
[Nexus 5 Themes and Apps] yorici:
I thought of white point as the white point. So setting maximum whites at 255,255. I get contrast by creating a S curve:darken blacks, turn up whites.
[Nexus 5 Themes and Apps] Deeco7:
What is the recommended N5 colour control for franco, besides stock?
[Nexus 5 Themes and Apps] yorici:
You probably want to look at this: http://xdaforums.com/showpost.php?p=49561443&postcount=13757 All questions are answered there. Fku app brings the newest version of colour control, though is paid
[Nexus 5 Themes and Apps] gpvecchi:
If someone wants is interested in calibration, here is a quick guide (in french...)

http://www.homecinema-fr.com/forum/files/colorimetre_pour_les_nuls_v2_204.pdf

Guys, may someone explain what is the difference between positive and negative values of each color?
[Nexus 5 Themes and Apps] yorici:
Our register is a LUT, a lookup table. The positive and negative values just allow more control. Making values like 10,5 possible by setting the positive on 11 and the negative on 10. It has no real function unless you can measure 0,5 differences. You have a colorimeter, so it might be useful to you when you almost have the best profile and want to be really precise. The difference might be for something else, but this is what you can do with it.

According to the pdf, this would be the order of adjustment?

6.2 - Les opérations de réglages à suivre dans l'ordre :

1 - Luminosité et contraste

2 - Gamma (Niveaux de gris)

3 - RVB (Couleurs)

4 - Saturations - Teinte

English

1) Luminance and contrast

2) Gamma

3) RGB (i guess color balance)

4) Saturation

One problem, adjusting any of these will affect the others, dont they?
[Nexus 5 Themes and Apps] yorici:
[MENTION=2752629]rajendra82[/MENTION] [MENTION=5543250]mag01[/MENTION]

I found a flaw in my/our thinking:

If our register were to be a LUT, each registervalue should represent the same amount of RGB space right?

Well it doesn't and we already knew that. But then we explained that by saying that our display applies gamma correction.

We settled with that.

One thing I have never been able to explain since December is the banding image in the DP-app. Every time I changed one register value to 255 a band would appear, but the pattern was weird to me as the first value seemed to represent 50% of the image. This however was not true.

I took a screenshot of the image and imported it to Photoshop. Then I found out that the left part of the image (black to full red) consisted of the following RGB values: (0,0,0) to (255,0,0). The middle is full red, which is also displays. The left part consists of: (255,0,0) to (255,255,255).

Knowing this, it explained my results: If you change the first value in the register, representing the highlights, to 255, you actually set the first value to 0 (because for the first 12 values 255 - x). So if (255,0,0) should be displayed, our LUT comes in and makes it to (0,0,0). And voila, a band appears.

Not a big deal right? Well, there are still two things I can't explain:

1) Some times the bands are bigger than others and yet the left part seems linearly distributed to me in Photoshop. This would still indicate some kind of gamma correction. But!

2) The midpoint of the left part (128,0,0) is between the 12th value and 13th value. This totally contradicts the previous point as this indicates a direct linear LUT, instead of gamma correction being applied after the registervalues. (And yes, the midpoint in RGB-values is just 1% off the midpoint in x-values indicating this is indeed a linear distributed gradient)

So I still think our LUT behaves linearly, but I don't know if the gamma correction is being applied afterwards of before our LUT being processed.
[Nexus 5 Themes and Apps] gpvecchi:
Yes, that's the order and yes, every value affects the others...
[Nexus 5 Themes and Apps] yorici:
Continuing on my banding questions I created a perfect gradient in Photoshop. I made every second pixel recognisable, but this translates to the 1th, 3th .. 255th RGB value being different.

This image appears then:

(This is all tested on red. RGB value x means (x,0,0))

After playing around with the values in the Faux app, I noticed the following. The midpoint is between the 12th and 13th registervalue and equals to 127(256/2 -1) in RGB-values. (mag01 already found this, but)

If you change the 10th value to 255, and the 15th value to 255, the amount of banding on each side of the midpoint is equal. I found this to be true for every couple of registervalues (12&13, 11&14, 10&15, etc).

When I knew that the amount of banding is equal for each side of the midpoint, I cut the image in half at the midpoint. Then I took measurements of the amount of banding for each value:

- The ranges seem to overlap eachother

- The midtones are controlled by values: 11, 12, 13, 14 (midtones being between 84 and 170)

- While shadows are practically controlled by 1 to 10 and some overlap of 11. (Reversed for highlights)

- The midpoints of the ranges of each value seem to be best expressed by this curve (This curve shouldn't be used as reference though as the banding appears as a range, not as a point. The curve just illustrates how the RGB values are distributed over the registervalues)

Then I couldn't explain why gamma seemed to be so much affected by value 10 and 11. I took a screenshot of the gamma image in the DPapp, loaded it up in Photoshop. The RGB value of the 2,2 box was 186 and of the 2,3 box 188. These RGB values are affected by registervalues 10 and 11. That explains why those registervalues have so much influence on them.

The following questions then arise:

How can we measure gamma without a colorimeter?

- Could this be possible: We first set contrast, colour balance, banding, saturation etc. And then we multiply that curve by a value to get gamma 2,2 for value 10 and 11 (and we hope for the rest of the values).

- Or can we create gamma 2,2 reference images for the other registervalues besides 10 and 11.

(I included a zip with all the gradient images so you guys can test this theory yourself. The image names have numbers before them to ensure the right order)

EDIT: Interesting fact: 0,7294^2,2 =0,5 and 0,7249*255 = 186 (the same value of the 2,2 gamma box in the DPapp)