Using the GC320 to adjust brightness, contrast, and hue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Using the GC320 to adjust brightness, contrast, and hue

跳至解决方案
3,216 次查看
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 解答
2,476 次查看
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 项奖励
回复
8 回复数
2,477 次查看
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 项奖励
回复
2,476 次查看
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

2,476 次查看
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 项奖励
回复
2,476 次查看
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 项奖励
回复
2,476 次查看
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 项奖励
回复
2,476 次查看
sheldonrucker
Contributor III

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

Sheldon

0 项奖励
回复
2,476 次查看
andre_silva
NXP Employee
NXP Employee

no problem, good luck =)

0 项奖励
回复
2,476 次查看
andre_silva
NXP Employee
NXP Employee

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

0 项奖励
回复