08-18-2016 05:17 PM
If my function takes sds_alloc'ed memory as inputs, for example:
void video_filter(unsigned char yc_in[NUMROWS*NUMCOLS*3],
unsigned char yc_out[NUMROWS*NUMCOLS*3]);
where yc_in and yc_out can be allocated using sds_alloc().
I also have a video buffer having a known address. Suppose the memory space associated with this address is a consecutive block, initialized by other functions.
What I should do to pass the video buffer address to this video_filter function? (I tried to pass the pointer as unsigned char*, but that failed).
08-18-2016 08:27 PM
check these XAPPs it may help you
08-19-2016 09:30 AM
Generally the way that we deal with things like this, particularly for the purpose of video processing, is to hook into a linux driver for the video in/out. Part of this driver will be exposure of a DRM GEM [Direct Rendering Manager, Graphics Execution Manager] device that allows you to memmap the physical frame buffer address into a virtual memory region in user space. An additional thing this layer gives you is a handle to a DRM buffer. SDSoC supports registering this buffer as a uncacheable/physically contiguous resource with a call to sds_register_dmabuf, and enables it to be interacted with as if it had been allocated with sds_alloc_non_cacheable.
The plumbing for all this is a bit of a mess, because it involves interacting with linux video capture devices and output frame buffers, along with all their management. If you want to see an example of this, check out the SDSoC zc706 HDMI sobel filter video reference design [http://www.xilinx.com/products/design-tools/softwa
Crack the design open, and find sds_register_dmabuf, and it'll lead you right to it.