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.

How to converte RGB888 into YUV422 using VIP csc?

Other Parts Discussed in Thread: DM385, TVP5158

I work with DM385 platform now.

When I create a capture-display chain to get the date from the VIP port ,it turns error with RGB888 dateformate into YUV422.

I wonder wheather VIP can transfer RGB888 into YUV 422 or not ?

regards,

Yang.

  • Yes, it is possible to convert RGB888 to YUV422 in DM385 VIP port. What error are you seeing? Can you provide your vip create time parameters?
    Also which rdk and its release that you are using?Rgds,Brijesh
  • Thanks for your answer.
    Here is my error.
    ********* Entered Capture + Display usecase - H264 1080p @60 fps, H264 D1 @30fps ********


    [host] 135: MCFW : CPU Revision [ES1.0] !!!

    [host] 135: MCFW : Detected [4x TVP5158 VS] Board !!!

    [host] 135: MCFW : Base Board Revision [REV A] !!!

    [host] 135: MCFW : Daughter Card Revision [REV A] !!!
    [m3vpss ] VPS_DCTRL_INST_0
    [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_DVO2
    [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_HDMI
    [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_SD
    [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_HDCOMP
    [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_CLK_SRC VPS_DC_VENC_HDMI | VPS_DC_VENC_HDCOMP
    [m3vpss ] HDCOMPCLK
    [m3vpss ] ####debug1#####!!!
    [m3vpss ] 2951: CAPTURE: Create in progress !!!
    [m3vpss ] 2988: CAPTURE: VIP0 PortA capture mode is [24-bit, Non-mux Discrete Sync - ACTVID_VBLK] !!!

    [host] USECASE SETUP DONE
    [m3vpss ] CAPTURE::HEAPID:0 USED:192
    [m3vpss ] 3310: CAPTURE: Create Done !!!
    [m3vpss ] 3318: DUP : Create Done !!!
    [m3vpss ] 3318: DISPLAY: Create in progress !!!
    [m3vpss ] DisplayId = 1,DataFormat = 1
    [m3vpss ] BP0 displayInstId = 0
    [m3vpss ] 3320: DISPLAY: Create Done !!!
    [m3vpss ] 3322: DISPLAY: Start in progress !!!
    [m3vpss ] 3383: DISPLAY: Start Done !!!
    [m3vpss ] 3384: DISPLAY: HDDAC(BP0) : 32 fps, Latency (Min / Max) = ( 255 / 0 ), Callback Interval (Min / Max) = ( 255 / 0 ) !!!
    [m3vpss ] 3384: DISPLAY: UNDERFLOW COUNT: HDMI(BP0) 1, HDDAC(BP0) 1, DVO2(BP1) 1, SDDAC(SEC1) 0
    [m3vpss ] 3384: SYSTEM : FREE SPACE : System Heap = 1675344 B, Mbx = 10238 msgs)
    [m3vpss ] 3384: SYSTEM : FREE SPACE : SR0 Heap = 14772608 B (14 MB)
    [m3vpss ] 3385: SYSTEM : FREE SPACE : Frame Buffer = 51876736 B (49 MB)
    [m3vpss ] 3385: SYSTEM : FREE SPACE : Bitstream Buffer = 61865856 B (58 MB)
    [m3vpss ] 3386: SYSTEM : FREE SPACE : Tiler Buffer = 128 B (0 MB) - TILER OFF
    [m3vpss ] 3389: CAPTURE: Start in progress !!!
    [m3vpss ] 3389: CAPTURE: Start Done !!!
    inside autorun
    sbulla: unknown partition table
    INIT: Entering runlevel: 5
    [m3vpss ]
    [m3vpss ] *** Capture Driver Advanced Statistics ***
    sbulla: unknown partition table
    [m3vpss ]
    [m3vpss ] VIP Parser Reset Count : 0
    [m3vpss ]
    [m3vpss ] | Total Even Odd Total Even Odd Min / Max Min / Max Dropped Fid Repeat Frame Error Y/C
    Starting telnet daemon [m3vpss ] CH | Fields Fields Fields FPS FPS FPS Width Height Fields Count (Desc Error Y/C)
    [m3vpss ] ------------------------------------------------------------------------------------------------------------
    [m3vpss ]
    .
    [m3vpss ] VIP Capture Port 0 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0
    [m3vpss ]
    [m3vpss ] *** Capture List Manager Advanced Statistics ***
    Starting syslogd/klogd: [m3vpss ]
    [m3vpss ] List Post Count : 0
    [m3vpss ] List Stall Count : 0
    [m3vpss ] List Post Time (ms) : Max = 0, Min = 65535, Avg = 0, Total = 0
    [m3vpss ] INTC Timeout Count : (0, 0) (Min timeout value = 2147483647, 2147483647)
    done
    [m3vpss ] Descriptor miss found count : 0
    [m3vpss ]
    [m3vpss ]
    [m3vpss ] VIP and VPDMA registers,
    [m3vpss ] VIP0 : FIQ_STATUS : 0x4810551c = 0x00000000
    [m3vpss ] VIP1 : FIQ_STATUS : 0x48105a1c = 0x00000000
    [m3vpss ] VPDMA: LIST_BUSY : 0x4810d00c = 0x00030000
    [m3vpss ]
    [m3vpss ]
    [m3vpss ] 6425: Assertion @ Line: 699 in drivers/capture/src/vpsdrv_captureLm.c: FVID2_SOK == retVal : failed !!!

    My rdk is IPNC_RDK_V3.8.0.

    Here is my parameter setting.


    capturePrm.numVipInst = 1;
    capturePrm.outQueParams[0].nextLink = gVdisModuleContext.displayId[0];

    capturePrm.tilerEnable = FALSE;
    capturePrm.enableSdCrop = FALSE;

    for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++)
    {
    pCaptureInstPrm = &capturePrm.vipInst[vipInstId];
    pCaptureInstPrm->vipInstId = SYSTEM_CAPTURE_INST_VIP0_PORTA;
    //pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_SII9135_DRV;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_RGB24_888;
    pCaptureInstPrm->standard = SYSTEM_STD_1080P_60;
    pCaptureInstPrm->numOutput = 1;

    pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat =SYSTEM_DF_RGB24_888;
    pCaptureOutPrm->scEnable = FALSE;
    pCaptureOutPrm->scOutWidth = 0;
    pCaptureOutPrm->scOutHeight = 0;
    pCaptureOutPrm->outQueId = 0;

    Regards,

    Yang.
  • Hello Yang,
    Do you want to have YUV output or RGB? The above code sets RGB input and output.
    Anyways, Capture list should never hang, it should lik it is trying to something which it should not do. Looks like either it is trying to program scalar coefficients or may be done discrete sync start up sequence. Do you happen to have source code of the hdvpss driver? we could put some debug prints and check where it hangs.
    Rgds,Brijesh
  • Hi, Brijesh Jadav.

    1.

    Sorry for my careless, I was then trying to figure it out.  So I've change the parameters .

    I want to get RGB input and YUV output.

    Generally speaking , I want to capture the RGB888 date from the VIP port ,and display it .

    According to my research these days ,I find that it could be done weather through VIP csc to converte RGB888 into YUV inside the VIP block,

    or use the GRPX block to display the RGB888 date without change it . I got it from the blow picture.

    But     I   have not seen a example of GRPX block .  So I  want to converte RGB888 to YUV   through VIP csc block.

    Now , we haven't  prepare the  external device to provide the RBG source. I want to get DM385 just ready to do that. 

    2.

    I have hdvpss drivers ,then I would try .

    Regards,

    yang

  • Can you comment out the call to API Vps_captDoDisSyncStartSequence in the vpsdrv_captureList.c?
    Please note that you need to connect external decode and configure it, otherwise VIP will not capture.
    Rgds,Brijesh
  • really thanks. It's ok now .
    But I wonder wheather this API's miss will influence the following work it need to do ?
    And what does this api do ?
    Regards,

    yang
  • Hello Yang,
    This API is not required for the DM385, so it is ok to comment it out for your use.
    Please note it is better to check code the sensor connected and configured and VIP is really capturing valid frames.
    Rgds,Brijesh
  • Hi,Brijesh Jadav.
    Appreciate your help.

    Regards,
    yang.