Using the GC320 to adjust brightness, contrast, and hue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using the GC320 to adjust brightness, contrast, and hue

Jump to solution
2,427 Views
sheldonrucker
Contributor III

Hello All,

I'm trying to find a way to adjust the brightness, contrast, and hue of a texture using the GC320 graphic processor on the i.MX6.   Does anyone know if this is possible?  If it is possible could you explain how or give a little example?

I've been reading through the "i.MX 6 2D API" but haven't come upon a solution.

Also, could someone point me at some example code for the 2D GPU API?  I've looked in both LTIB and the Freescale documentation but haven't found anything.

Thank you,

Sheldon

1 Solution
1,687 Views
andre_silva
NXP Employee
NXP Employee

We Don´t have functions like that in the API, instead you could do that using the shaders (OpenGLES) or OpenCL, in this case, using gc2000.

regards,

Andre

View solution in original post

0 Kudos
8 Replies
1,688 Views
andre_silva
NXP Employee
NXP Employee

We Don´t have functions like that in the API, instead you could do that using the shaders (OpenGLES) or OpenCL, in this case, using gc2000.

regards,

Andre

0 Kudos
1,687 Views
sheldonrucker
Contributor III

Thanks you for checking on that Andre!

Unfortunately for the application I'm working on we need to use the 2D GPU.  We've been able to get around the problem by making the color space adjustments by setting the color space conversion matrix via a frame buffer ioctl.  This has the limitation in that it effects all items drawn to that particular frame buffer.  However, we're only drawing the items whose color space we need adjusted to one frame buffer and overlaying the rest in another so that does the trick.

By the way do you know if Freescale provides any sample code for the 2D API?  If so, would you please provide me a link?

Thank you,

Sheldon

1,687 Views
shanxigjz
Contributor II

Hi Sheldon,

I am trying to use CSC to adjust contrast of UI, do you have get this work?

could you give me some ideads how to get this work?

thank you very much.

0 Kudos
1,687 Views
sheldonrucker
Contributor III

Hello Gao,

I couldn't get it to work.  I ended up modifying the CSC (color space conversion) matrix in the kernel.  The only drawback with this method is that it modifies everything in the associated frame buffer.

Thank you,

Sheldon

0 Kudos
1,687 Views
andre_silva
NXP Employee
NXP Employee

Hi Sheldon,

for the 2D API I only found the one attached, it will be available on the next gpu sdk release. Hope it helps you.

regards,

Andre

0 Kudos
1,687 Views
sheldonrucker
Contributor III

Thank you Andre!  I'm sure this will help.

Sheldon

0 Kudos
1,687 Views
andre_silva
NXP Employee
NXP Employee

no problem, good luck =)

0 Kudos
1,687 Views
andre_silva
NXP Employee
NXP Employee

I´m going to look for it and let you know

0 Kudos