i.MX6: Alpha blending example code

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX6: Alpha blending example code

3,259 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

8 Replies

903 Views
ranshalit
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

903 Views
jamesmin
Contributor II

Thank you for the reply Ganesan.

Also your test code works find to me as well.

0 Kudos

903 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.

903 Views
ranshalit
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

903 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

903 Views
ganesank
Contributor III

The kernel version is 3.10.17

0 Kudos

903 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

903 Views
Yuri
NXP TechSupport
NXP TechSupport

Great !

0 Kudos