adjust balck_dep with Gamma

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

adjust balck_dep with Gamma

1,105件の閲覧回数
springtimes
Contributor I

default value:int gs[16] = {0,2,4,8,16,32,64,96,128,160,192,224,255,255,255,255};

cal :for (i=8 ; i<16 ; i++)
        {

         gs[i] = gs[i] /v;

        }

v value range =0.5,1.0,1.5,2.0,2.5...,5.0;

     /*change into data for reg*/

        for(int i=0; i<16; i++)
        {
            if(0==i) {
                gx[i] = gs[i];
                gy[i] = 16*(gs[i+1]-gs[i]);
            }
            if((i>=1)&&(i<=4)) {
                gx[i] = 2*gs[i]-gs[i+1];
                gy[i] = (2<<(4-i))*(gs[i+1]-gs[i]);
            }
            if((i>=5)&&(i<=14)) {
                gx[i] = gs[i];
                gy[i] = gs[i+1]-gs[i];
            }
            if(15==i) {
                gx[i] = gs[i];
                gy[i] = 255-gs[i];
            }
        }

struct mxcfb_gamma gamma_s = {
         1 ,
         {gx[0],gx[1],gx[2],gx[3],gx[4],gx[5],gx[6],gx[7],gx[8],gx[9],gx[10],gx[11],gx[12],gx[13],gx[14],gx[15]} ,
         {gy[0],gy[1],gy[2],gy[3],gy[4],gy[5],gy[6],gy[7],gy[8],gy[9],gy[10],gy[11],gy[12],gy[13],gy[14],gy[15]}
        };

ioctl cmd:ioctl(fd, MXCFB_SET_GAMMA, &gamma_s)

My question:How to become smooth when change v value?

I have try to change “gs[i] = gs[i] /v;” to “gs[i] -= 30×v; or gs[i] -= 20×v;or gs[i] -= 15×v;"and so on. The effect is not obvious.

 Pls help me,thanks!

ラベル(1)
0 件の賞賛
返信
4 返答(返信)

982件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi  springtimes

please check below examples which may help in your case

ipu-examples - i.MX IPU Examples 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

982件の閲覧回数
springtimes
Contributor I
0 件の賞賛
返信

982件の閲覧回数
springtimes
Contributor I

Hi igorpadykov:

 for csc, using the sample code with

mx6: framebuffer: example2: adding source code

 For Gamma with DP,i can't find the sample code.Can you show me the website or you can list the important code.

Thank you!

0 件の賞賛
返信

982件の閲覧回数
springtimes
Contributor I

I list the the code for black_dep with gamma , it is also the source code of the reference code library.

0 件の賞賛
返信