i.MX6: Alpha blending example code

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

i.MX6: Alpha blending example code

5,345 Views
ganesank
Contributor III

I was looking for good examples to understand alpha blending methods supported in i.MX6. I got one good example which is operating at IPU driver level but not at frame-buffer level. After lot of searches in google and trying bits and pieces of code based on i.MX6 reference manual and i.MX6 Linux reference manual I developed test code for three types of alpha blending,

  • Global alpha blending
  • Local alpha blending with alpha values passed in a separate buffer (24-bit bpp)
  • Local alpha with alpha value in pixels (32-bit bpp Ex. RGBA/BGRA)

 

I could test this code on the target and it helped me to understand those methods better. I am sharing my test code here so that it will be useful to anyone in the community. Enable one of the alpha methods at the compile time and run it on the target.

 

Regards,

Ganesan. K

Original Attachment has been moved to: imx6_alpha_blending_example.c.zip

9 Replies

1,399 Views
jiangyaqiang
Contributor IV

HI ganesank:

 

  Does your  test example "imx6_alpha_blending_example.c.zip"   still be ? I could not downlaod it , could you please send my one ? 

  thanks.

0 Kudos

2,989 Views
rans
Senior Contributor I

Hello Ganesan,

Thank you very much for the examples !

Do you think it should also function for RGBA6666 too ?

I need to use LVDS output, and I only find that several people tried to do it, but it seems that no one had much success:

RGBA/ARGB LVDS output from i.MX6 

I also find the following examples:

ipu-examples - i.MX IPU Examples 

But it seems that RGBA is allways 8888 in these examples, and there is no RGBA6666.

I also don't find RGBA666 in the header file of IPU

Linux source code: arch/arm/plat-mxc/include/mach/ipu.h (v3.6) - Bootlin 

Thank you for the time,

ranran

0 Kudos

2,989 Views
jamesmin
Contributor II

Thank you for the reply Ganesan.

Also your test code works find to me as well.

0 Kudos

2,989 Views
zhengl
Contributor II

What kernel version are you using for alpha in pixels, I found alpha in pixels is not used in MXCFB_SET_LOC_ALPHA  kernel code of 4.14.98.

2,989 Views
rans
Senior Contributor I

Hello Zheng,

Not sure I understand... Is it possible to do alpha blending with imx6 ?
As far as I understand from previous answers this feature is not supported,

So, did you manage to do alpha blending with imx6 ? How ?

Thanks

0 Kudos

2,989 Views
jamesmin
Contributor II

Hi Ganesan, Can I ask which Kernel version are you using for this test code?

I am trying to run this for alpha in pixels but it doesn't work.

I am thinking I might need right kernel version. My kernel is 3.14.28.

0 Kudos

2,989 Views
ganesank
Contributor III

The kernel version is 3.10.17

0 Kudos

2,989 Views
ganesank
Contributor III

I used kernel headers for mxcfb.h in my test code. I don't know how to make this available in the user space in the Yocto build framework. Has anyone done it so far? Is there a patch to export this header to sysroots/

0 Kudos

2,989 Views
Yuri
NXP Employee
NXP Employee

Great !

0 Kudos