AnsweredAssumed Answered

Custom SDMA script to convert bayer image

Question asked by Chris Roed on Nov 30, 2015
Latest reply on Dec 3, 2015 by Chris Roed

Hello Freescale folks,


First some background

I an IMX6Solo running the 3.14.28 wandboard kernel image which has been modified to aquire bayer image data.  I currently have a system that can aquire bayer video and convert it to RGBx format using the bayer2rgb gstreamer plugin, however the CPU is almost at 100% usage for a 640x480 video stream, and I need a 1280x720 video.   It looks like the other people who've had to convert bayer2rgb were using dual/quad core CPUs so they had enough horsepower to get it done, but I don't have that luxury.


I think it may be possible to use the SDMA engine to do this conversion for me by loading in the data, performing some shifts and masks to realize a nearest neighbor type of algorithm and then writing out the date to an output buffer.  These types of opcodes are all available in the SDMA engine, so I'm excited to try this out.  I'd need to have the SDMA available from a gstreamer plugin in order for this to work.


I've been reading a blog ( Freescale i.MX SDMA tutorial (part IV) )  that has some excellent information on the freescale SDMA system, but it was written 4 years ago and there are quite a few changes to the kernel code since then.


I guess the first question is, for anyone familiar with the SDMA system, is this even possible, and how can I get a hold of the freescale assembler to write my custom script? 


Next question:  In the blog I linked to, the guy wrote a function to load his script and run it, but he put it at the end of the sdma_probe function.  I need whatever function I'm going to use accessible from a gstreamer plugin, and I need to give it variables for the src/dest address.  If I write this function, and declare it in the include/linux/platform_data/dma-imx-sdma.h file would it be accessible to a gstreamer plugin?



I'm open to any other suggests for converting the data if anyone has them!