AnsweredAssumed Answered

iMX6 GPU development without X11

Question asked by Konstantyn Prokopenko on Jul 30, 2015
Latest reply on Sep 15, 2016 by john stone

Hello,

 

I'm working on a project where I need to use GPU for converting Bayer image form a CMOS camera to RGB or YUV format. I've found very nice implementation of Bayer OpenGL shaders and converted in to OpenGL ES2. I don't have X11 environment because we are using images for iMX6 VPU H.264 encoding. To be able to render an image I'm using virtual framebuffer driver which emulates framebuffers with adjustable parameters. Also I'm using latest Freescale libGLESv2, libEGL and libGAL libraries and generating display, window and surface using FB extention: fbGetDisplayByIndex, fbCreateWindow, etc... Furthermore, I can see virtual framebuffer driver is accessed for /dev/fb0 and memory is mapped. I'm reading resulting image using glReadPixels() call.

Running all this beauty on iMX6 gives me garbage, although I can see some rendering from original Bayer image but it is almost unrecognizable. I've changed different configurations for rendering, input types, formats but it didn't help. Also I exported and used glTexDirectVIV, glTexDirectInvalidateVIV calls to load data but still bad results.

I'm checking ALL errors, none reported.

Also I've compiled my code for my development X86 Linux with X11 and rendering exactly the same code on Nvidia GPU with X11 window minus specific Vivante GPU stuff. In this cdase image looks great, so shaders and opengles2 specific code works fine. The only difference is that I'm using GL_LUMINANCE to load bayer image in X11 case and GL_RGB in iMX6 case because I guess framebuffer display does not support LUMINANCE type.

I've tried configuring and using LDB display driver and native MXC framebuffer, results where the same.

Also there is a great forum on this topic which i followed and used several suggestions but for no results.

i.MX6: camera image processing with 16 bit per color channel (IPU->GPU->VPU) under Linux

 

Did anybody have any experience with X11-less GPU processing on iMX6?

Thank you very much!

 

Regards,

Konstantyn

Outcomes