你好,目前采用FPGA+8168,通过VIN接口16位,BT1120格式,我采用的是分场的格式,VIN接口前8位输入Y数据,后8位输入UV数据,通过A8保存数据,发现数据不对
Ternence_Hsu:
你好;
你在DM8168的capture link 中能否正常采集到数据了?
jin xin:
回复 Ternence_Hsu:
capture link能收到数据,但是数据一部分是对的,一大部分数据是乱的,因为FPGA发送的数据是固定的颜色数据(绿色),刚才看了一下FPGA程序,发现时钟频率我设置了148.5MHZ,但是数据是1080I60,这个会引起数据紊乱吗
VampireDaVinci:
回复 jin xin:
1080i的PCLK是74.25MHz !!!
Ternence_Hsu:
回复 jin xin:
1920x1080i (60 Hz, 16:9) Pixel Clock = 74.25 MHz ( EIA-CEA-861 )
jin xin:
回复 Ternence_Hsu:
谢谢你的回复,如果CLK=148.5MHZ,capturelink能收到数据只是数据有大部分错误,但是把CLK设置成74.25MHZ,capturelink能进入CaptureLink_drvCallback,但是frameList.numFrames始终为0,也就是收不到一帧数据,不知道为什么
Ternence_Hsu:
回复 jin xin:
再查查你的fgpa那端的数据发送是否正确,第四个字的F位是否是 0 1间隔来发送的?
jin xin:
回复 Ternence_Hsu:
fpga那边应该没问题,原因有(1)在148.5MHZ的时候,8168能收到数据,就是数据内容不对。(2)之前用过6467,6467和FPGA也是通过BT1120通信,源码一样。我觉得是不是8168配置引起的。我的配置如下:
pCaptureInstPrm = &capturePrm.vipInst[vipInstId]; pCaptureInstPrm->vipInstId = (SYSTEM_CAPTURE_INST_VIP0_PORTA + vipInstId)%SYSTEM_CAPTURE_INST_MAX; pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_TVP7002_DRV; pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;// YUV422P or RGB888 pCaptureInstPrm->standard = SYSTEM_STD_1080I_60; pCaptureInstPrm->numOutput = 1; pCaptureOutPrm = &pCaptureInstPrm->outParams[0]; pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV; pCaptureOutPrm->scEnable = FALSE; pCaptureOutPrm->scOutWidth = 0; pCaptureOutPrm->scOutHeight = 0; pCaptureOutPrm->outQueId = 0;
inScanFormat = FVID2_SF_INTERLACED; pVipCreateArgs->inScanFormat = inScanFormat; pObj->maxWidth = 1920; pObj->maxHeight = 1080; pVipCreateArgs->numCh = 1; pVipCreateArgs->videoCaptureMode = VPS_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC; pVipCreateArgs->videoIfMode = VPS_CAPT_VIDEO_IF_MODE_16BIT;
pVipCreateArgs->periodicCallbackEnable = TRUE;
pVipCreateArgs->numStream = pInstPrm->numOutput;
for (outId = 0; outId < pVipCreateArgs->numStream; outId++) { pVipOutPrm = &pVipCreateArgs->outStreamInfo[outId];
pOutPrm = &pInstPrm->outParams[outId];
pVipOutPrm->dataFormat = pOutPrm->dataFormat;
pVipOutPrm->memType = VPS_VPDMA_MT_NONTILEDMEM;
if (pObj->createArgs.tilerEnable && (pOutPrm->dataFormat == FVID2_DF_YUV420SP_UV)) { pVipOutPrm->memType = VPS_VPDMA_MT_TILEDMEM; }
pVipOutPrm->pitch[0] = VpsUtils_align(pObj->maxWidth, VPS_BUFFER_ALIGNMENT * 2);
if (pVipOutPrm->dataFormat == FVID2_DF_YUV422I_YUYV) pVipOutPrm->pitch[0] *= 2; else if(pVipOutPrm->dataFormat == FVID2_DF_YUV420SP_UV) pVipOutPrm->pitch[0] /= 2; else if (pVipOutPrm->dataFormat == FVID2_DF_RGB24_888) pVipOutPrm->pitch[0] *= 3;
pVipOutPrm->pitch[1] = pVipOutPrm->pitch[0];
pVipOutPrm->pitch[2] = 0;