Hi,
i have read the follow discussion,but it still can not work.
And if plug the video signal in before the application start, there is no video on the screen.
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/222543/787692.aspx#787692
here is my usercase :
capture--->dei--->displayt ,
the signal is connected at vip1_portA. with BT.656 (PAL). 8bit mode.
My platform is DVRRDK_03.00.00.00, Would you please tell me how to modify to PAL mode, thanks!
here is my usercase code,please help me correct the follow code
CaptureLink_CreateParams capturePrm;
CaptureLink_VipInstParams *pCaptureInstPrm;
CaptureLink_OutParams *pCaptureOutPrm;
DeiLink_CreateParams deiPrm;
DisplayLink_CreateParams displayPrm;
UInt32 captureId,vipInstId;
UInt32 displayId;
UInt32 deiId;
UInt32 i;
CHAINS_INIT_STRUCT(CaptureLink_CreateParams,capturePrm);
CHAINS_INIT_STRUCT(DisplayLink_CreateParams,displayPrm);
CHAINS_INIT_STRUCT(DeiLink_CreateParams,deiPrm);
captureId = SYSTEM_LINK_ID_CAPTURE;
displayId = SYSTEM_LINK_ID_DISPLAY_1;
deiId = SYSTEM_LINK_ID_DEI_1;
printf("%s\n",__func__);
for(i = 0; i < gChains_ctrl.chRecNum; i++)
{
gChains_ctrl.chCfg[i + gChains_ctrl.chCapNum].channel = i;
}
/* Capture */
if(chainsCfg->chCapNum > 0)
{
capturePrm.numVipInst = chainsCfg->chCapNum;
capturePrm.tilerEnable = FALSE;
capturePrm.numBufsPerCh = 16;
capturePrm.numExtraBufs = 0;
capturePrm.maxBlindAreasPerCh = 0;
capturePrm.isPalMode = TRUE;
capturePrm.enableSdCrop = FALSE;
capturePrm.doCropInCapture = FALSE;
for(i = 0; i< capturePrm.numVipInst; i++)
{
vipInstId = SYSTEM_CAPTURE_INST_VIP1_PORTA + 2*gChains_ctrl.chCfg[i].channel;
pCaptureInstPrm = &capturePrm.vipInst[i];
pCaptureInstPrm->vipInstId = vipInstId%SYSTEM_CAPTURE_INST_MAX;
pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_ADV7401_DRV;
pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
pCaptureInstPrm->standard = VSYS_STD_PAL;
pCaptureInstPrm->numOutput = 1;
pCaptureInstPrm->numChPerOutput = 0;
pCaptureInstPrm->frameCaptureMode = FALSE;
pCaptureInstPrm->fieldsMerged = FALSE;
pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV;
pCaptureOutPrm->scEnable = FALSE;
pCaptureOutPrm->scOutWidth = 0;
pCaptureOutPrm->scOutHeight = 0;
pCaptureOutPrm->outQueId = 0;
}
capturePrm.outQueParams[0].nextLink = deiId;
}
deiPrm.inQueParams.prevLinkId = captureId;
deiPrm.inQueParams.prevLinkQueId = 0;
deiPrm.outQueParams[DEI_LINK_OUT_QUE_DEI_SC].nextLink = displayId;
deiPrm.enableOut[DEI_LINK_OUT_QUE_DEI_SC] = TRUE;
deiPrm.tilerEnable[DEI_LINK_OUT_QUE_VIP_SC] = FALSE;
deiPrm.comprEnable = FALSE;
deiPrm.setVipScYuv422Format = FALSE;
deiPrm.enableDeiForceBypass = FALSE;
deiPrm.enableLineSkipSc = FALSE;
/*
deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].scaleMode = DEI_SCALE_MODE_RATIO;
deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].ratio.widthRatio.numerator = 1;
deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].ratio.widthRatio.denominator = 1;
deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].ratio.heightRatio.numerator = 1;
deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].ratio.heightRatio.denominator = 1;
*/
/* Dis */
if(chainsCfg->chRecNum > 0)
{
for(i = chainsCfg->chCapNum; i < chainsCfg->chNum; i++)
{
chainsCfg->displayRes[i - chainsCfg->chCapNum] = chainsCfg->displayRes[i];
}
Chains_displayCtrlInit(chainsCfg->displayRes);
displayPrm.numInputQueues = 1;
displayPrm.activeQueue = 0;
displayPrm.inQueParams[0].prevLinkId = deiId;
displayPrm.inQueParams[0].prevLinkQueId = 0;
displayPrm.displayRes = chainsCfg->displayRes[0];
displayPrm.forceFieldSeparatedInputMode = FALSE;
}
/*
* Create Links
*/
if(chainsCfg->chCapNum > 0)
{
System_linkCreate(captureId, &capturePrm,sizeof(capturePrm));
System_linkCreate(deiId,&deiPrm,sizeof(deiPrm));
System_linkCreate(displayId,&displayPrm,sizeof(displayPrm));
}
/*
* Start Links
*/
if(chainsCfg->chRecNum > 0)
{
System_linkStart(displayId);
System_linkStart(deiId);
System_linkStart(captureId);
}
int osdfd;
int flag = 0;
osdfd = exbutton_open("/dev/input/event0",O_RDONLY);
if(osdfd < 0)
{
printf("ERROR:open osd key device error !!!\n");
}
while(1)
{
int ch;
#if 0
ch = get_layout(osdfd,4);
if(ch == 0)
{
close(osdfd);
break;
}
#endif
ch = Chains_menuRunTime();
if(ch=='0')
break;
if(ch=='v')
System_linkControl(captureId, CAPTURE_LINK_CMD_FORCE_RESET, NULL, 0, TRUE);
if(ch=='p') {
System_linkControl(captureId, CAPTURE_LINK_CMD_PRINT_ADV_STATISTICS, NULL, 0, TRUE);
System_linkControl(deiId, DEI_LINK_CMD_PRINT_STATISTICS, NULL, 0, TRUE);
System_linkControl(displayId, DISPLAY_LINK_CMD_PRINT_STATISTICS, NULL, 0, TRUE);
}
}
/*
* Stop Links
*/
if(chainsCfg->chCapNum > 0)
{
System_linkStop(captureId);
System_linkStop(deiId);
System_linkStop(displayId);
}
/*
* Delete Links
*/
if(chainsCfg->chCapNum > 0)
{
System_linkDelete(captureId);
System_linkDelete(deiId);
System_linkDelete(displayId);
}
Chains_displayCtrlDeInit();
}
#if defined(__cplusplus)
}
#endif