Hi,
I have some problems running my video application with a 480x640 sensor as the video input.
i'm working on a custom board with a DM6437 DSP. The application I am using was designed on the DM6437EVM. I have done three iterations of this application. They are:
- running the application on the EVM with the TVP5146 videodecoder as the video source. The application runs correctly.
- running the application on the the custom board with another videodecoder as the video source. The application runs correctly.
- running the application with the 640x480 imager as video source, the application creates an error. Note that my test application (that is not using the FVID driver, is working very well so it's should not be a hardware issue. I have also verified that the data reaches the DSP).
Both imager and videodecoder use BT656 sync embedding.
Here is the most flagrant symptom of the error. In the code below, when using the videodecoder (i.e. the application is working), when the code returns from the FVID_dequeue function, the apphandle->frameBuffPtr is properly set. When using the imager, this pointer is not set correctly, which causes everything that follows to fail (capture, resizer and processing). This leaves me to beleive that it is because the hGioVpfeCcdc object is not correctly configured.
if (status == 0)
{
for (i=0; i<FRAME_BUFF_CNT && status == 0; i++)
{
result = FVID_allocBuffer(hGioVpfeCcdc, &frameBuffTable[i]);
status = (result == IOM_COMPLETED && frameBuffTable[i] != NULL ? 0 : -1);
}
}
// prime up the video capture channel
if (status == 0) {
FVID_queue(hGioVpfeCcdc, frameBuffTable[0]);
FVID_queue(hGioVpfeCcdc, frameBuffTable[1]);
FVID_queue(hGioVpfeCcdc, frameBuffTable[2]);
}
// prime up the video display channel
if (status == 0) {
FVID_queue(hGioVpbeVid0, frameBuffTable[3]);
FVID_queue(hGioVpbeVid0, frameBuffTable[4]);
FVID_queue(hGioVpbeVid0, frameBuffTable[5]);
}
// grab first buffer from input queue
if (status == 0)
{
FVID_dequeue(hGioVpfeCcdc, &apphandle->frameBuffPtr);
}
I am not familliar enough with the FVID driver to pinpoint where I go wrong.
The only changes I do from videodecoder to imager is changing the input width to 640 where it is set to 720 before.
Here is the vpfe structure I pass to the FVID_Create function:
#define VID_PARAMS_CCDC_IMAGER { \
FVID_CCDC_YCBCR_8, /* dataFlow */ \
FVID_FRAME_MODE, /* ffMode */ \
640, /* height */ \
480, /* width */ \
(640 * 2), /* pitch */ \
0, /* horzStartPix */ \
0, /* vertStartPix */ \
NULL, /* appCallback */ \
{ \
PSP_VPFE_TVP5146_Open, /* extVD Fxn */ \
PSP_VPFE_TVP5146_Close, \
PSP_VPFE_TVP5146_Control, \
}, \
0 /*segId */ \
}
I have noticed that when I change the ffMode to FVID_FIELD_MODE, the FVID_Create call fails.
Have any of you dealt with something like this before?
Do you have any hints on where I go wrong?