This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

VPFE progressive capture problem

Hi all

I have a custom platform with an MT9P031 sensor attached. I have successfully ported the DVSDK demos to work with my platform. I have the encode demo working with the captured images being displayed on a 320x240 oled display and all looks fantastic except that the frame rate is only 15fps but the capture standard is 720P_30 and as such I expect 30fps. I have checked the clock and vsync into the dm365 and there are in fact 30 frames per second coming into the vpfe.

I have noticed that dmai/linux/Capture.c checks for 720P_30 and if true sets a flag called halfRateCapture to TRUE in order to reduce the capture rate by half.

I have placed debug into the vpfe_isr() function and do in fact get 30 interrupts, 1 for each frame. The code execution does follow the correct path thru this function. ie. field==FIELD_NONE.

I changed the video std to 720P_60 to see how it would react and then I get no capture buffers received at all at the application/dmai level. Strange this is that I do get the vpfe_isr() interrupt and 60 frames come in at that point but nothing ever is passed up to the higher level. In vpfe_isr() process_buffer_complete() is never called. It appears that whenever the skip_frame_count is initialised to 1 then I never get the frame passed up. If skip_frame_count > 1 then I always get a frame however the result is obviously missed frames due the skip_frame_count being greater than 1.

I thought this would be an easy problem to solve as it appeared to be an interlace / progressive config problem but now I am lost.

I notice that when skip_frame_count is greater than 1, higher level gets frame,  the vpfe_imp_dma_isr() is called via interrupt and a new buffer is scheduled. But when the skip_frame_count=1 and I get no frames at the higher level the vpfe_imp_dma_isr() is never ever called and there is no buffer scheduled so vpfe_isr() never calls vpfe_process_buffer_complete() due to the fact that the cur_frame and next_frame variables are always equal thanks to the missing vpfe_imp_dma_isr().

HELP PLEASE SOMEONE THIS IS DRIVING ME CRAZY!

Thanks

PK