Hello,
I have a DM648 EVM with the DVSDK and i success to compile and put the full demo provided with the kit.
I used this link for porting it to new CCS: http://processors.wiki.ti.com/index.php/Porting_DM648_DVSDK_demo_app_from_CCSv3.3_to_CCSv4
I also success to run the video-preview example in "dvsdk_1_11_00_00_DM648\examples\video_preview".
And now i want to use the video preview example and add image processing between the capture and display.
I also success to modify a frame and display it with this link:
http://processors.wiki.ti.com/index.php/Accessing_Pixels_in_a_Frame_on_the_DM643x
My problem is that if i modify the current frame and display it, it works fine:
/* grab a fresh video input frame */
FVID_exchange(capChan, &frameBuffPtr);
/* Image processing */ (modify the frame)
process_image( (void*)(frameBuffPtr->frame.frameBufferPtr));
BCACHE_wbInv((void*)(frameBuffPtr->frame.frameBufferPtr), 576*720, 1);
/* display the video frame */
FVID_exchange(disChan, &frameBuffPtr);
But now i need to create a temporary frame because i need the current frame to process the new frame (median filter...),
How to create this intermediary frame?
I try some things but it doesn't work. I try to create a temporary buffer with a mem alloc:
tempBuffer = MEM_alloc(DDR2, 576*720, 0);
and after my loop processing:
/* grab a fresh video input frame */
FVID_exchange(capChan, &frameBuffPtr);
/* Image processing */(fill temp buffer)
process_image( (void*)(frameBuffPtr->frame.frameBufferPtr),(void*)(tempBuffer));
/* Now change the current frame pointer with new tempbuffer */
frameBuffPtr->frame.frameBufferPtr=tempBuffer;
BCACHE_wbInv((void*)(frameBuffPtr->frame.frameBufferPtr), 576*720, 1);
/* display the video frame */
FVID_exchange(disChan, &frameBuffPtr);
This seem to doesn't work, the output image is flashing...
I don't know if it's the right way to create a temporary frame.
Is the MEM_alloc bad?
I also try to use FVID_allocBuffer to allocate a new temporary frame buffer but the function need a channel parameter:
FVID_allocBuffer(capChan, &frameBuffPtr);
So i assume that the video port will use it and so when i create an intermediary frame on display channel:
FVID_Frame *tempFrameBuffPtr = NULL;
/*Create temporay frame*/
FVID_allocBuffer(disChan, &frameBuffPtr);
and don't add it to the channel queue (FVID_queue), the output image is bad (it seem jump frame or lag, bug).
So can you help me to create an intermediary frame and display it after processing.
Thank you.
Max