AnsweredAssumed Answered

about gamma correction

Question asked by lin zhang on Jan 16, 2018
Latest reply on Jan 18, 2018 by lin zhang

I wan't to implement a display contrast adjustment machanism in linear mode,  but I don't know how to do it.

according to Gamma correction on i.MX6 ,  following steps can do gamma correction:

1 - Declare a variable as mxcfb_gamma:

 

struct mxcfb_gamma fb_gamma;

 

2 - Enable the gama correction:

 

fb_gamma.enable = 1;

 

3 - Set the constk and slopek values, where i = 0 to 15 and x and y are respectively the new constk and slopek constant values:

 

fb_gamma.constk[i] = x;

fb_gamma.slopek[i] = y;

 

4 - Open the framebuffer device and call MXCFB_SET_GAMMA:

 

fd_fb = open("/dev/fb0", O_RDWR, 0)

ioctl(fd_fb, MXCFB_SET_GAMMA, &fb_gamma)

 

how do I choose the constk & slopek values to insure the contrast vary in linear mode?

 

Outcomes