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.

DM8148 screen capture (writeback capture from SC5)



Hello TI' teams,

I would be very grateful if you help me to solve a small problem.

My use case perform next action items:
1) Capture single channel video in XGA resolution (1024x768@30fps) from VIP1[Port-A], perform processing by C64x' sub-core, such image correction and improvement, return back processed video to HDVPSS and display it via HDMI. DSP works as process link.
2) Add graphics overlay in my application via FB.
3) Capture display contains (SC5 writeback capture: video and overlays), perform H264 encode and stream encoded video by RTP.

First capture channel from video source routed to queueId[0] of capture link.
Second capture channel from SC5 routed to queueId[1] of capture link.
HDMI output configurated to full HD resolution - 1920x1080@60fps.
Encode and stream only video from SC5.

capture link, encoder and HDMI display works looked fine (capture buffers counters always incremented in links statistics) but all buffers from write-back capture device are empty. I watch RTP stream by latest version of VLC player and can see "green" frames on VLC. Pay attention that VLC continue count frames from RTP and show proper resolution and codec type.
Video captured from VIP and processed by DSP showed properly on HDMI display (video buffers aren't empty).
Only write-back capture supplying "empty buffers".
 

Video capture conficurated as is following:
===================================================================
vipInstId = 0;
    pCaptureInstPrm->enableTimestampInInterrupt = TRUE;
    pCaptureInstPrm->vipInstId          = SYSTEM_CAPTURE_INST_VIP1_PORTA;
    pCaptureInstPrm->videoCaptureMode   = SYSTEM_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC;
    pCaptureInstPrm->videoIfMode        = SYSTEM_CAPT_VIDEO_IF_MODE_16BIT;
    pCaptureInstPrm->inScanFormat       = SYSTEM_SF_PROGRESSIVE;
    pCaptureInstPrm->videoDecoderId     = 0;
    pCaptureInstPrm->inDataFormat       = SYSTEM_DF_YUV422P;
    pCaptureInstPrm->standard           = standard;
    pCaptureInstPrm->numOutput          = 1;
    pCaptureInstPrm->numChPerOutput     = 1;
    pCaptureInstPrm->useAdvancedParams  = FALSE;
       
    pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV422I_YUYV;
    pCaptureOutPrm->scEnable            = FALSE;
    pCaptureOutPrm->scOutWidth          = 0;
    pCaptureOutPrm->scOutHeight         = 0;
    pCaptureOutPrm->outQueId            = 0;

===================================================================

Writeback capture configuration as is following:
===================================================================
vipInstId = 1;
        pCaptureInstPrm                     = &pCapturePrm->vipInst[vipInstId];
        pCaptureInstPrm->enableTimestampInInterrupt = TRUE;
        pCaptureInstPrm->vipInstId          = SYSTEM_CAPTURE_INST_SC5_WB2;
        pCaptureInstPrm->videoDecoderId     = 0;
        pCaptureInstPrm->videoCaptureMode   = SYSTEM_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC;
        pCaptureInstPrm->videoIfMode        = SYSTEM_CAPT_VIDEO_IF_MODE_16BIT;
        pCaptureInstPrm->inScanFormat       = SYSTEM_SF_PROGRESSIVE;
        pCaptureInstPrm->inDataFormat       = SYSTEM_DF_RGB24_888;
        pCaptureInstPrm->standard           = SYSTEM_STD_1080P_60;
        pCaptureInstPrm->numOutput          = 1;
        pCaptureInstPrm->useAdvancedParams  = FALSE;

        pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];
        pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV422I_YUYV;
        pCaptureOutPrm->scEnable            = FALSE;
        pCaptureOutPrm->scOutWidth          = 1920;
        pCaptureOutPrm->scOutHeight         = 1080;
        pCaptureOutPrm->outQueId            = 1;
==================================================================

Please help me resolve the little problem.

  • Hello,

    What is the software release that you are using here?

    Best Regards,
    Margarita
  • Hello Margarita. I'm use latest version of RDK
  • Hello,

    For DVR RDK support please contact your local FAE.

    Best Regards,
    Margarita
  • Hello Marat,
    COuld you try the settings in this example -
    mcfw/src_linux/mcfw_api/usecases/ti810x/multich_progressive_8ch_vcap_venc_vdec_vdis.c

    Thanks,
    Prashant.
  • Hello Mr. Prashant Nandakumar

     
    I'm very glad for your reply, but use-case proposed by you isn't exact for my purpose.
    I need capture video in XGA resolution, process by DSP (image correction and reconstruct),
    blend graphics from FB with processed video, send blended video to HDMI and make screen capture from HDMI output and after this encode and send screen captured video by stream.
    But in your use-case used screen capture for simple copy HDMI contains to SDTV

    May I ask you share document described in details how exact write-back capture works?

  • I met the same problem,can you tell me ,how did you fixed it!

    thanks a lot!

  • Hi Guanghui Pan,
    for dvr-rdk4.02 in file ti_tools/hdvpss/packages/ti/psp/vps/drivers/src/vps_init_ti814x.c you need initialize the screen capture device.
  • Hi Marat, Prashant,

    1. Do we need to configure swms to SYSTEM_SW_MS_SC_INST_SC5, so that the same SC5 is used both in swms and as capture WB ?
    2. How do we need to initialize capture device in HDVPSS vps_init_ti814x.c ? Isn't it being initalized by default ? I see that VPS_MODULE_INCLUDE_CAPTURE_VIP is defined by default, so I'm not sure what else is missing.

    Thank you,
    Ran
  • Hi Ran,

    Once you use SC5 in the WB mode, it cannot be used in M2M SC driver.. It is blocked by the Wb capture driver.
    This is not allowed.

    Regards,
    Brijesh
  • Hello Brijish,

    In mcfw/src_linux/mcfw_api/usecases/ti810x/multich_progressive_8ch_vcap_venc_vdec_vdis.c example which was reference as example for caupture writeback , you can see that sc5 is used twice:

    in swms:
    swMsPrm[1].swMsInstId[0] = SYSTEM_SW_MS_SC_INST_SC5;
    and as capture wb:
    pCaptureInstPrm->vipInstId = SYSTEM_CAPTURE_INST_SC5_WB2;

    Is this on purpose, i.e. if we use with swms another device, then writeback will not function , Right ?

    Regards,
    Ran
  • Hi Ran,

    this usecase (8ch) does not use write back capture. If i remember correctly, it is 4ch encode/decode usecase which uses capture write back to display same contents on HDMI as well as on SD.
    Please refer to the 4ch encode/decode usecase. you will get the idea about how to enable write back capture.
    Please note that once you use SC5 in write back capture, you cannot use it in SWMS. You have to select another scalar to do SWMS.


    Rgds,
    Brijesh
  • Hi,

    I see in ti810x/multich_progressive_4d1_vcap_venc_vdec_vdis.c
    that SC5 is used with swms too:
    swMsPrm[1].swMsInstId[0] = SYSTEM_SW_MS_SC_INST_SC5;

    Regards,
    Ran
  • Can you please check if there is any other 4 ch usecase?
    Also which dvr-rdk release that you are using? This usecase was started in some later releases only.

    Rgds,
    Brijesh
  • Hi Ran,

    In this usecase, if SDDISPLAY_TIED_WITH_HDDISPLAY macro is defined, it will use Write back capture and only one instance of the SWMS. This single instance of SWMS will use SC3 driver and SC5 scalar will be used only for the Writeback capture.
    It also initialises the write back capture, under this SDDISPLAY_TIED_WITH_HDDISPLAY macro. Can you please follow this usecase? it is working fine

    Regards,
    Brijesh
  • Hi,

    I use DVRRDK 04.01.00.02, and according to some posts the mentioned use captureWB:
    e2e.ti.com/.../1540381

    Marat,
    Is that what you understand too (swms before HDMI is using sc5 ) ?

    Regards,
    Ran
  • Hi Ran,


    Capture Wb is supported on 4.1 release on TI810x, so it should be fine.
    There is an example of capture wb on TI810x in 4ch enc/dec usecase.
    Here there is only one instance of SWMS is used.
    For the second display, HDMI output is downscaled to D1 using SC5 on write back capture and then displayed using SD output.

    What exactly issue are you facing?

    Regards,
    Brijesh
  • Hi Brijesh,

    Thank you very much for the help.
    I have flickering in display since adding the captureWB, and I don't get anything recorded.

    Currently, the usecase in using swms before HDMI , and is configured as following:
    swMsPrm.swMsInstId[0] = SYSTEM_SW_MS_SC_INST_DEI_SC_NO_DEI;
    Should I change it to be:
    swMsPrm.swMsInstId[0] = SYSTEM_SW_MS_SC_INST_SC5;
    As In the TI810x in 4ch enc/dec usecase ?

    Regards,
    Ran
  • Hello,

    Is there anyone who can please help on this ?

    BR,

    Ran

  • I now get green frames, but I don't see the video and graphics. Any idea ?
  •  in file ti_tools/hdvpss/packages/ti/psp/vps/drivers/src/vps_init_ti814x.c you need initialize the screen capture device.

    (Just compare 814x with 816x initialization)

  • I get:

    [m3vpss ] 13290: CAPTURE: Overflow detected on VIP1, Total Resets = 1.
    When I try to use captureWB,

    Is it some memory issue in vpss ?

  • Hi,

    If I disable sc in the captureWB, then I don't get overflow, but yet I seems that there is nothing in buffer (green packets).

    I am using queue 1, channel 0:


    capturePrm.numVipInst++;
    gVcapModuleContext.isWrbkCaptEnable = TRUE;
    pCaptureInstPrm = &capturePrm.vipInst[2];
    pCaptureInstPrm->vipInstId = SYSTEM_CAPTURE_INST_SC5_WB2;
    pCaptureInstPrm->videoDecoderId = 0;
    pCaptureInstPrm->inScanFormat = SYSTEM_SF_PROGRESSIVE;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
    pCaptureInstPrm->standard = SYSTEM_STD_XGA_60;//SYSTEM_STD_XGA_60
    pCaptureInstPrm->numOutput = 1;

    pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV;
    pCaptureOutPrm->scEnable = FALSE;
    pCaptureOutPrm->scOutWidth = 720;
    pCaptureOutPrm->scOutHeight = 480;//480;
    pCaptureOutPrm->outQueId = 1;

    capturePrm.outQueParams[1].nextLink = gVcapModuleContext.nsfId[0];

    nsfPrm.inQueParams.prevLinkId = gVcapModuleContext.captureId; //ranranx dupId;


    ....
    Venc_start();
    Vcap_start();

    Vcap_startWrbkCapt();
    .....
    Int32 Vcap_startWrbkCaptDefault()
    {
    ....
    wrbkCapt.queId = 1;
    wrbkCapt.chId = 0;
    wrbkCapt.enable = TRUE;
    .....
    }

    Regards,
    Ran
  • Both of these issues are unrelated.
    VIP Capture overflow is not related to the scalar in the write back path, assuming you are using HDMI write back path.
    VIP capture overflow comes when your input signal in unstable, or when scalar is used in the VIP path and it is trying to upscale the input image. Please check both of these errors.
    If you are getting correct fps from the write back capture, it means write back capture is working fine. It is just that somewhere in the write back pipeline coefficients are not set correctly. Please check if CSC and SC coefficients in the write back pipeline are set correctly.

    Rgds,
    Brijesh
  • Hi Brijesh,

    We have a working pipeline without captureWB. On adding captureWB we don't have the recordedfile from encoder.
    We are struglling with captureWB for some couple of days. I hope we can reach TI's help on this.

    Can you give some practical suggestion what should I exactly test in pipeline ?
    1. HDMI works with SYSTEM_STD_XGA_60 resolution, so I try to give this resolution in the WB,
    2. I have also given scEnable=FALSE, or must I use SC ? I am not sure.
    3. "If you are getting correct fp" - how should I check it ? Can you please give some practical method for testing this ?

    Since we are not sure we'll make it work, and are struggling on this for some couple of days now, we are now considering connecting SD output to VIP input :
    e2e.ti.com/.../2124809

    Regards,
    Ran
  • Hi Ran,

    Did you try running the default usecase in TI810x? This usecase is working fine. This usecase even uses scalar to downscale 1080p output to SD resolution.
    just press 'p' on uart console to get the performance stats.

    Regards,
    Brijesh
  • Hello Brijesh,

    Thank you for the reply.
    Do you have some seconds to take a look at my previous questions (1-3) ?
    We already have a working usecase, with one pipeline which records video and display live video.
    Now we just need to add captureWB because the recording should include graphic.
    If the system can't support it, (with capturewb, or with other alternatives, like I mentioned in other thread), then it's really bad situation.

    I really would appreciate if you have some seconds to take a look to my questions in previous message.

    BR,
    Ran