I'm attempting to use the dm3730
evm in a composite video loopback test and about half the time I run
the test application the video is "jumpy" with old frames being
displayed mixed in with current frames. The other half the time the
video appears smooth as expected, but does display "noise" that I assume
is the same as identified here: SDOCM00073286. The test involves
attaching an ntsc camera to the composite video input and an ntsc
display to the composite video output. I then run the following command
on the console to put the output in ntsc mode:
echo "13500,720/16/58/64,482/6/31/6" > /sys/devices/platform/omapdss/display1/timings
The
test application is very simple in terms of initializing the capture
and display interfaces using dmai and starting an infinite loop swapping
buffers between capture and display interfaces. Code attached below for
reference:
int main(int argc, char *argv[])
{
Buffer_Handle hCapBuf, hDisBuf;
Display_Handle hDisplay;
BufTab_Handle hDisplayBufTab;
Capture_Handle hCapture;
BufTab_Handle hCaptureBufTab;
Capture_Attrs cAttrs;
Display_Attrs dAttrs;
BufferGfx_Attrs gfxAttrs;
Int32 bufSize;
Dmai_init();
// create capture buffer table
gfxAttrs = BufferGfx_Attrs_DEFAULT;
gfxAttrs.colorSpace = ColorSpace_UYVY;
BufferGfx_calcDimensions(VideoStd_D1_NTSC, ColorSpace_UYVY, &gfxAttrs.dim);
bufSize = BufferGfx_calcSize(VideoStd_D1_NTSC, ColorSpace_UYVY);
bufSize = (bufSize + 4096) & (~0xFFF);
hCaptureBufTab = BufTab_create(Capture_Attrs_OMAP3530_DEFAULT.numBufs, bufSize, BufferGfx_getBufferAttrs(&gfxAttrs));
if(hCaptureBufTab == 0)
{
printf("%s - BufTab_create failed\n", __FUNCTION__);
return -1;
}
// create capture
cAttrs = Capture_Attrs_OMAP3530_DEFAULT;
cAttrs.videoInput = Capture_Input_COMPOSITE;
cAttrs.videoStd = VideoStd_D1_NTSC;
hCapture = Capture_create(hCaptureBufTab, &cAttrs);
if(hCapture == 0)
{
printf("%s - Capture_create failed\n", __FUNCTION__);
return -1;
}
// create display buffer table
gfxAttrs = BufferGfx_Attrs_DEFAULT;
gfxAttrs.colorSpace = ColorSpace_UYVY;
BufferGfx_calcDimensions(VideoStd_D1_NTSC, ColorSpace_UYVY, &gfxAttrs.dim);
bufSize = BufferGfx_calcSize(VideoStd_D1_NTSC, ColorSpace_UYVY);
bufSize = (bufSize + 4096) & (~0xFFF);
hDisplayBufTab = BufTab_create(Display_Attrs_O3530_VID_DEFAULT.numBufs, bufSize, BufferGfx_getBufferAttrs(&gfxAttrs));
if(hDisplayBufTab == 0)
{
printf("%s - BufTab_create failed\n", __FUNCTION__);
return -1;
}
// create display
dAttrs = Display_Attrs_O3530_VID_DEFAULT;
dAttrs.videoStd = VideoStd_D1_NTSC;
dAttrs.videoOutput = Display_Output_COMPOSITE;
hDisplay = Display_create(hDisplayBufTab, &dAttrs);
if(hDisplay == 0)
{
printf("%s - failed to create display\n", __FUNCTION__);
return -1;
}
while(true)
{
if(Capture_get(hCapture, &hCapBuf) < 0)
{
printf("%s - Capture_get failed\n", __FUNCTION__);
continue;
}
if(Display_get(hDisplay, &hDisBuf) < 0)
{
printf("%s - Display_get failed\n", __FUNCTION__);
continue;
}
Capture_put(hCapture, hDisBuf);
Display_put(hDisplay, hCapBuf);
}
return 0;
}
Does
it appear that I am I doing the setup and usage correctly in the code
provided? If the setup and usage appears correct then is "jumpy" video
expected behavior with composite ntsc loopback on dm3730
evm? Are there plans to address the "noise" identified in
SDOCM00073286, and if not has the cause of the "noise" been identified
so that we might address it in our own designs?
Thanks,
Greg
P.S. I had previously posted this question on the DM37x DaVinci Video Processor Forum, but I suspect it was the wrong forum for the question... Regardless, sorry for the cross-post.