This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TDA2EXEVM: VIP Data missing

Part Number: TDA2EXEVM

Tool/software: TI-RTOS

Hi,

I am creating a usecase for 6channel recording. the below is the use-case.

Capture -> Dup -> VPE -> Display

Dup -> VPE_D1  -> Encode -> IPCIn(A15) -> (Link to write data in shared memory)

For that i am accessing data from  two VIP ports, namely "VIP1 Slice0 PortA"  for 4 channels and "VIP1 Slice1 PortA"  for remaining 2 channels.

In "VIP1 Slice0 PortA" out of four channels, it is noticed that any one channels date is  missing out. In "VIP1 Slice1 PortA" both channels are doing fine.

I have also attached the logs, please help me resolve this issue.
5444.6ch_recording_001.txt

  • Hi,

    I am also adding the capture set params function for your reference.

    #if 1
    Void ChainsCommon_6CH_VDEC_SetCapturePrms(
                            CaptureLink_CreateParams *pPrm,
                            UInt32 captureInWidth,
                            UInt32 captureInHeight,
                            UInt32 captureOutWidth,
                            UInt32 captureOutHeight,
                            Chains_CaptureSrc captureSrc
                            )
    {
        UInt32  streamId;
    
        CaptureLink_VipInstParams *pInstPrm, *pInstPrm_1;
        CaptureLink_InParams *pInprms, *pInprms_1;
        CaptureLink_OutParams *pOutprms, *pOutprms_1;
        CaptureLink_VipScParams *pScPrms, *pScPrms_1;
        CaptureLink_VipPortConfig    *pPortCfg;
    
        memset(pPrm, 0, sizeof(*pPrm));
        /* For SCV usecase number of camera is always 1 */
        pPrm->numVipInst = 2;
        pPrm->numDssWbInst = 0;
    
       // for (i=0; i<SYSTEM_CAPTURE_VIP_INST_MAX; i++)
            pInstPrm = &pPrm->vipInst[0];
            pInprms = &pInstPrm->inParams;
            pInstPrm->vipInstId     =  0;
    
                pInstPrm->vipInstId     =  SYSTEM_CAPTURE_INST_VIP1_SLICE1_PORTA;
    	    pInstPrm->videoIfMode   =  SYSTEM_VIFM_MCH_PIXEL_MUX_ES;
                pInstPrm->videoIfWidth  =  SYSTEM_VIFW_8BIT;
                pInstPrm->bufCaptMode   =  SYSTEM_CAPT_BCM_FRM_DROP;
                pInstPrm->numStream     =  1;
    	    pInstPrm->numCh         =  4; //4 channel from TW9984
                /*need to change  pInstPrm->numCh to the number of channels you need capture*/
    
                pInprms->width      =   captureInWidth;
                pInprms->height     =   captureInHeight/2;
                pInprms->dataFormat =   SYSTEM_DF_YUV422P;
                pInprms->scanFormat =   SYSTEM_SF_INTERLACED;
    
            pInstPrm_1 = &pPrm->vipInst[1];
            pInprms_1 = &pInstPrm->inParams;
            pInstPrm_1->vipInstId     =  1;
    
                pInstPrm_1->vipInstId     =  SYSTEM_CAPTURE_INST_VIP1_SLICE2_PORTA; 
    	    pInstPrm_1->videoIfMode   =  SYSTEM_VIFM_MCH_PIXEL_MUX_ES;
                pInstPrm_1->videoIfWidth  =  SYSTEM_VIFW_8BIT;
                pInstPrm_1->bufCaptMode   =  SYSTEM_CAPT_BCM_FRM_DROP;
                pInstPrm_1->numStream     =  1;
    	    pInstPrm_1->numCh         =  2; //2 channel from TW9984
                /*need to change  pInstPrm->numCh to the number of channels you need Bj*/
    
                pInprms_1->width      =   captureInWidth;
                pInprms_1->height     =   captureInHeight/2;
                pInprms_1->dataFormat =   SYSTEM_DF_YUV422P;
                pInprms_1->scanFormat =   SYSTEM_SF_INTERLACED;
    
            for (streamId = 0; streamId < CAPTURE_LINK_MAX_OUTPUT_PER_INST;
                    streamId++)
            {
                pOutprms = &pInstPrm->outParams[streamId];
                pOutprms->width         =   captureOutWidth;
                pOutprms->height        =   captureOutHeight;
                pOutprms->dataFormat    =   SYSTEM_DF_YUV420SP_UV;
                pOutprms->maxWidth      =   pOutprms->width;
                pOutprms->maxHeight     =   pOutprms->height;
    	    if(captureSrc == CHAINS_CAPTURE_SRC_VIDDEC_TW9984)
                {
                    pOutprms->width         =   captureOutWidth;
                    pOutprms->height        =   captureOutHeight/2;
                    pOutprms->dataFormat    =   SYSTEM_DF_YUV422I_YUYV;
                    pOutprms->maxWidth      =   pOutprms->width;
                    pOutprms->maxHeight     =   pOutprms->height;
                }
                if((pInprms->width != pOutprms->width) ||
                    (pInprms->height != pOutprms->height))
                {
                    pOutprms->scEnable      =   TRUE;
                }
                else
                {
                    pOutprms->scEnable      =   FALSE;
                }
                pOutprms->subFrmPrms.subFrameEnable = FALSE;
                pOutprms->subFrmPrms.numLinesPerSubFrame = 0;
    
                if(captureSrc == CHAINS_CAPTURE_SRC_AR0132RCCC)
                {
                    pOutprms->dataFormat    =   SYSTEM_DF_YUV422I_UYVY;
                }
            }
            for (streamId = 0; streamId < CAPTURE_LINK_MAX_OUTPUT_PER_INST;
                    streamId++)
            {
                pOutprms_1 = &pInstPrm_1->outParams[streamId];
                pOutprms_1->width         =   captureOutWidth;
                pOutprms_1->height        =   captureOutHeight;
                pOutprms_1->dataFormat    =   SYSTEM_DF_YUV420SP_UV;
                pOutprms_1->maxWidth      =   pOutprms_1->width;
                pOutprms_1->maxHeight     =   pOutprms_1->height;
    	    if(captureSrc == CHAINS_CAPTURE_SRC_VIDDEC_TW9984)
                {
                    pOutprms_1->width         =   captureOutWidth;
                    pOutprms_1->height        =   captureOutHeight/2;
                    pOutprms_1->dataFormat    =   SYSTEM_DF_YUV422I_YUYV;
                    pOutprms_1->maxWidth      =   pOutprms->width;
                    pOutprms_1->maxHeight     =   pOutprms->height;
                }
                if((pInprms_1->width != pOutprms_1->width) ||
                    (pInprms_1->height != pOutprms_1->height))
                {
                    pOutprms_1->scEnable      =   TRUE;
                }
                else
                {
                    pOutprms_1->scEnable      =   FALSE;
                }
                pOutprms_1->subFrmPrms.subFrameEnable = FALSE;
                pOutprms_1->subFrmPrms.numLinesPerSubFrame = 0;
    
                if(captureSrc == CHAINS_CAPTURE_SRC_AR0132RCCC)
                {
                    pOutprms->dataFormat    =   SYSTEM_DF_YUV422I_UYVY;
                }
            }
            pScPrms = &pInstPrm->scPrms;
            pScPrms->inCropCfg.cropStartX = 0;
            pScPrms->inCropCfg.cropStartY = 0;
            pScPrms->inCropCfg.cropWidth = pInprms->width;
            pScPrms->inCropCfg.cropHeight = pInprms->height;
            pScPrms = &pInstPrm->scPrms;
            pScPrms->inCropCfg.cropStartX = 0;
            pScPrms->inCropCfg.cropStartY = 0;
            pScPrms->inCropCfg.cropWidth = pInprms->width;
            pScPrms->inCropCfg.cropHeight = pInprms->height;
    
            pScPrms->scCfg.bypass       = FALSE;
            pScPrms->scCfg.nonLinear    = FALSE;
            pScPrms->scCfg.stripSize    = 0;
    
            pScPrms->userCoeff = FALSE;
    
            pScPrms_1 = &pInstPrm->scPrms;
            pScPrms_1->inCropCfg.cropStartX = 0;
            pScPrms_1->inCropCfg.cropStartY = 0;
            pScPrms_1->inCropCfg.cropWidth = pInprms->width;
            pScPrms_1->inCropCfg.cropHeight = pInprms->height;
            pScPrms_1 = &pInstPrm->scPrms;
            pScPrms_1->inCropCfg.cropStartX = 0;
            pScPrms_1->inCropCfg.cropStartY = 0;
            pScPrms_1->inCropCfg.cropWidth = pInprms->width;
            pScPrms_1->inCropCfg.cropHeight = pInprms->height;
    
            pScPrms_1->scCfg.bypass       = FALSE;
            pScPrms_1->scCfg.nonLinear    = FALSE;
            pScPrms_1->scCfg.stripSize    = 0;
    
            pScPrms_1->userCoeff = FALSE;
            /* pScPrms->scCoeffCfg is not reuquired in case
             * pScPrms->userCoeff is FALSE
             */
            pPortCfg = &pInstPrm->vipPortCfg;
            pPortCfg->syncType          =   SYSTEM_VIP_SYNC_TYPE_DIS_SINGLE_YUV;
            pPortCfg->ancCropEnable     =   FALSE;
    
    
    
            pPortCfg->intfCfg.clipActive    =   FALSE;
            pPortCfg->intfCfg.clipBlank     =   FALSE;
            pPortCfg->intfCfg.intfWidth     =   SYSTEM_VIFW_16BIT;
    
            pPortCfg->disCfg.fidSkewPostCnt     =   0;
            pPortCfg->disCfg.fidSkewPreCnt      =   0;
            pPortCfg->disCfg.lineCaptureStyle   =
                                    SYSTEM_VIP_LINE_CAPTURE_STYLE_ACTVID;
            pPortCfg->disCfg.fidDetectMode      =   SYSTEM_VIP_FID_DETECT_MODE_PIN;
            pPortCfg->disCfg.actvidPol          =   SYSTEM_POL_HIGH;
            pPortCfg->disCfg.vsyncPol           =   SYSTEM_POL_HIGH;
            pPortCfg->disCfg.hsyncPol           =   SYSTEM_POL_HIGH;
            pPortCfg->disCfg.discreteBasicMode  =   TRUE;
    
            pPortCfg->comCfg.ctrlChanSel        =   SYSTEM_VIP_CTRL_CHAN_SEL_7_0;
            pPortCfg->comCfg.ancChSel8b         =
                                    SYSTEM_VIP_ANC_CH_SEL_8B_LUMA_SIDE;
            pPortCfg->comCfg.pixClkEdgePol      =   SYSTEM_EDGE_POL_RISING;
            pPortCfg->comCfg.invertFidPol       =   FALSE;
            pPortCfg->comCfg.enablePort         =   FALSE;
            pPortCfg->comCfg.expectedNumLines   =   pInprms->height;
            pPortCfg->comCfg.expectedNumPix     =   pInprms->width;
            pPortCfg->comCfg.repackerMode       =   SYSTEM_VIP_REPACK_CBA_TO_CBA;
            pPortCfg->actCropEnable             =   TRUE;
    
            if ((captureSrc == CHAINS_CAPTURE_SRC_HDMI_720P) ||
                (captureSrc == CHAINS_CAPTURE_SRC_HDMI_1080P))
            {
                pPortCfg->actCropEnable         =   FALSE;
            }
    
            pPortCfg->actCropCfg.srcNum                     =   0;
            pPortCfg->actCropCfg.cropCfg.cropStartX         =   0;
            pPortCfg->actCropCfg.cropCfg.cropStartY         =   0;
            pPortCfg->actCropCfg.cropCfg.cropWidth          =   pInprms->width;
            pPortCfg->actCropCfg.cropCfg.cropHeight         =   pInprms->height;
    
            pPortCfg->ancCropCfg.srcNum                     =   0;
            pPortCfg->ancCropCfg.cropCfg.cropStartX         =   0;
            pPortCfg->ancCropCfg.cropCfg.cropStartY         =   0;
            pPortCfg->ancCropCfg.cropCfg.cropWidth          =   0;
            pPortCfg->ancCropCfg.cropCfg.cropHeight         =   0;
    
            if(captureSrc == CHAINS_CAPTURE_SRC_AR0132RCCC)
            {
                pPortCfg->disCfg.lineCaptureStyle   =   SYSTEM_VIP_LINE_CAPTURE_STYLE_HSYNC;
                pPortCfg->disCfg.fidDetectMode      =   SYSTEM_VIP_FID_DETECT_MODE_VSYNC;
                pPortCfg->disCfg.actvidPol          =   SYSTEM_POL_LOW;
                pPortCfg->disCfg.vsyncPol           =   SYSTEM_POL_LOW;
                pPortCfg->disCfg.hsyncPol           =   SYSTEM_POL_HIGH;
                pPortCfg->comCfg.ancChSel8b         =   SYSTEM_VIP_ANC_CH_SEL_DONT_CARE;
                pPortCfg->comCfg.pixClkEdgePol      =   SYSTEM_EDGE_POL_FALLING;
            }
    	if(captureSrc == CHAINS_CAPTURE_SRC_VIDDEC_TW9984)
            {
    	    printf("CHAINS_CAPTURE_SRC_VIDDEC_TW9984 Setted\n"); 
                pPortCfg->syncType                              =  SYSTEM_VIP_SYNC_TYPE_EMB_2X_422_YUV;
                pPortCfg->actCropEnable                         =  FALSE;
                pPortCfg->comCfg.expectedNumLines               =  0;
                pPortCfg->comCfg.expectedNumPix                 =  0;
                //TVP5158 pPortCfg->comCfg.pixClkEdgePol                  =  SYSTEM_EDGE_POL_FALLING;
                pPortCfg->actCropCfg.cropCfg.cropWidth          =  0;
                pPortCfg->actCropCfg.cropCfg.cropHeight         =  0;
    	
                //TVP5158 Bsp_platformSetVipClkInversion(pInstPrm->vipInstId, TRUE);
            }
    
            pInstPrm->numBufs = CAPTURE_LINK_NUM_BUFS_PER_CH_DEFAULT + 2;
        }
    #endif
    

  • Hi there,

    Is there any update in this..?

    Rgds

    Balaji T

  • Balaji,

    It seems VIP is receiving erroneous frames for one of the input channel. I see frame sizes are varying a lot and so does fps look wrong. 

    Could you please check your input? Is input providing frames correctly/

    Rgds,

    Brijesh

  • Hi Brijesh,

    will you please tell me that how to evaluate that my input is providing frames correctly..?

    Rgds

    Balaji T

  • You need to check the source that you are connecting to the VIP.

    Rgds,

    Brijesh

  • Hi Balaji,

    We haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Yordan