Hi,
I'm using the VPORTs of DM642 to capture four NTSC camera video and doing some
image processing (like mirroring or rotations) and then output the processed
video image to VPORT for display. The video decoder I use is ADV7180.
I have a question about the video port configuration. Please refer the code
below for my current settings.
#define LINE_SZ 720
#define NUM_LINES 240
#define START_Y 9
VPORTCAP_Params DM642_vCapParamsChan = {
VPORT_MODE_BT656_8BIT, /* cmode:3 */
VPORT_FLDOP_FRAME, /* fldOp:3 */
VPORT_SCALING_DISABLE, /* scale:1 */
VPORT_RESMPL_DISABLE, /* resmpl:1 */
VPORTCAP_BPK_10BIT_ZERO_EXTENDED, /*bpk10Bit:2*/
VPORTCAP_HRST_SAV, /*hCtRst:1 */
VPORTCAP_VRST_END_VBLK, /*vCtRst:1 */
VPORTCAP_FLDD_DISABLE, /*fldDect:1 */
VPORTCAP_EXC_DISABLE, /*extCtl:1 */
VPORTCAP_FINV_ENABLE, /* fldInv:1 */
0, /*fldXStrt1 */
START_Y, /*fldYStrt1 : 1*/
0, /*fldXStrt2 */
START_Y+1, /*fldYStrt2 : 1*/
LINE_SZ-1, /*fldXStop1 */
NUM_LINES+START_Y, /*fldYStop1 */
LINE_SZ-1, /*fldXStop2 */
NUM_LINES+START_Y, /*fldYStop2 */
((LINE_SZ)>>3), /*thrld */
3, /*numFrmBufs*/
128, /*alignment */
VPORT_FLDS_MERGED, /*mergeFlds */
NULL, /*segId */
EDMA_OPT_PRI_HIGH, /* edmaPri */
8
};
With this configuration, in one of the captured video image, there is a grey
flickering horizontal line which slowly moves upward from the bottom of the
video image. When the line reaches top of of the image, it disappear for a
while (about 8 seconds) and then appears at the bottom and moves upward again.
It takes 73 seconds for the line move from the bottom to the top.
Here were the experiments I did.
1. If I change the value of NUM_LINES from 240 to 243, the flickering line disappears.
2. I change the configuration according to the file evmdm642_vcapparamsNTSC_EMBEDDED.c
which I found in \CCStudio_v3.1\boards\evmdm642\examples\video\scaling (the
installation of my evmdm642). So here is the new configuration:
#define LINE_SZ 720
#define NUM_LINES 240
VPORTCAP_Params DM642_vCapParamsChan = {
VPORT_MODE_BT656_8BIT, /* cmode:3 */
VPORT_FLDOP_FRAME, /* fldOp:3 */
VPORT_SCALING_DISABLE, /* scale:1 */
VPORT_RESMPL_DISABLE, /* resmpl:1 */
VPORTCAP_BPK_10BIT_ZERO_EXTENDED, /*bpk10Bit:2 */
VPORTCAP_HRST_SAV, /*hCtRst:1 */
VPORTCAP_VRST_EAV_V0, /*vCtRst:1 */
VPORTCAP_FLDD_DISABLE, /*fldDect:1 */
VPORTCAP_EXC_DISABLE, /*extCtl:1 */
VPORTCAP_FINV_ENABLE, /* fldInv:1 */
0, /*fldXStrt1 */
18,//1, /*fldYStrt1 */
0, /*fldXStrt2 */
18,//1, //15, /*fldYStrt2 */
LINE_SZ-1, /*fldXStop1 */
NUM_LINES+18, //+14, /*fldYStop1 */
LINE_SZ-1, /*fldXStop2 */
NUM_LINES+18, //+14, /*fldYStop2 */
(LINE_SZ>>3), /*thrld */
3, /*numFrmBufs*/
128, /*alignment */
VPORT_FLDS_MERGED, /*mergeFlds */
NULL, /*segId */
EDMA_OPT_PRI_HIGH, /*edmaPri */
8 /* irqId */
};
I notice that except the start and stop settings, there is another difference
between the two configurations, the "vCtRst".
I'm new to DM642 so I'm not sure what correct configuration will be.
Please help.
Thanks a lot!
Leo Chen