I am working with a TMS320DM6437 EVM,
My application gets video from a I2C camera, processes it and displays it in a LCD monitor. I have no problems getting video and displaying it
( configuring VPFE, VPFE, Venc, etc).. I'm trying to incoporate histogram module.
I followed application samples included in dvsdk_1_01_00_15\psp_1_00_02_00\ which have a video integration sample ( using histogram, h3A, resizer, previewer, etc). along with some application source files (psp_vpss_integrated.c, psp_bios_hist_st_sample.c) that have encapsulated functions to interact with histogram module and what they do is to obtain a histogram from an image taken from a mt9001 camera module, and then dumps the statistics into a file.
According to these files and documentation about histogram driver, There are basically 4 steps to integrate histogram module:
- Initialize edma3 driver
- Create a histogram instance: histHandle = GIO_create(histDeviceName, IOM_INPUT, NULL, hEdma, NULL)
- Configure it: histConfigIOMReturnCode = GIO_control(histHandle, PSP_HIST_IOCTL_SET_PARAMS, &histParams)
- Make a 1st Enqueu to activate histogram: histFirstEnqueueIOMReturnCode = GIO_submit(histHandle, PSP_VPSS_QUEUE, histEnBuffer, &histFirstEnqueueSize, NULL);
- Make a 2nd Enqueu: histEnqueueIOMReturnCode = GIO_submit(histHandle, PSP_VPSS_QUEUE, histEnBuffer, &histEnqueueSize, NULL);
- Make a dequeue to get histogram from driver: histDequeueIOMReturnCode = GIO_submit(histHandle, PSP_VPSS_DEQUEUE, histDeBuffer, &histDequeueSize, NULL);
Of course, Specific details about in&out buffers, configuration parameters, etc are to be considered.
From all these very general steps, I get an error when attempting to DEQUEUE histogram from driver, GIO_submit always returns a -2 value instead of a 0 ( succesful).
All previous steps work perfectly and have no problems with it... the only consideration I'm aware of is that steps 4 to 6 should be performed AFTER getting image from camera device (using FVID_exchange( ) with VPFE instance) , which is considered.
Has anybody had any similar problem obtaining histogram ?? (regardless of the camera device used )
What could be a very probable cause for my dequeuing error ?? I've checked my code several times, compared it with the samples mentioned above, and can't find any bug.
Need a little guidance here, any comments would be really helpful.
Thank you !!!