IPU color keying

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

IPU color keying

844 Views
laurentgonzalez
Contributor II

Hi there,

i am running graphical+video app on imx35 + Linux 2.6.31. I want to display graphics over video (rear camera for vehicle).

The graphic layer is painted (Qt manages fb0) with a key color and the composition is all right.

Unfortunately this setting only works in 32bpp (normally color keying is not required since 32bpp has alpha channel), and switching to 24bpp or 16bpp makes color keying not working anymore.

This is a major issue as we drive VGA/SVGA panels and 32bpp sucks too much memory bandwith, 16bpp would be great.

See how I enabled color keying:

ipu_sdc_color_key param = { .channel=MEM_SDC_BG, .enable=1, .colorKey=0x080808 };
error = ioctl(fd_ipu, IPU_SDC_SET_COLOR_KEY, &param);

See how I switch between 16bpp(default in the frame buffer driver) and 32bpp:

fd_fb = open("/dev/fb0", O_RDWR, 0);
ioctl(fd_fb, FBIOGET_VSCREENINFO, &var);
var.bits_per_pixel = 32;
ioctl(fd_fb, FBIOPUT_VSCREENINFO, &var);

Are there any known bugs with 16bpp color keying ? Does Linux 3.x has a clever IPU initialisation/implementation ?

Thanks for help.

Labels (1)
0 Kudos
2 Replies

574 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Laurent,

I recommend to try with gstreamer in order to see if the issue with colorkey is in QT or IPU, http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-b...

with videotestsrc you should be able to send a video to IPU and change the 16bpp on the fly due to The VDIC that can also perform on-the-fly combination and color keying. The position and size of the foreground layer are configurable.

Hope this helps

/Alfred

0 Kudos

574 Views
laurentgonzalez
Contributor II

Alfred,

thank you for taking the time to give me an answer. Your recommendation is highly valuable, and I will test it very soon.

Note that I hit the same problem without Qt, with a very simple derivative work from mxc_v4l2_tvin.c (found in the Freescale multimedia package): the graphic plane is painted by directly writing to mmap'ed fb0, and various ioctl are performed to control color key, and bpp depth. I tried as much as possible to test every possible configuration, but the IPU always refused to enable color keying in 16bpp.

In the case you (or someone else) want to reproduce this issues, http://pastebin.com/5p790Y7c holds some code to get started quickly. I apologize for the very bad code layout, this is only testing code, given as is.

--

Laurent

0 Kudos