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 optimal yuv frame to skype local preview latency?

Hi TI expert,

We have an usecase "camera->sclr->ipcFrameoutVpsstoHost->ipcFrameInHost" run at dm814x. We send yuv422 640x360 30fps frame data to skype local preview via usb cable, but the latency is more than 110msec. This latency value is define at skype/lync specification. we already let usecase run at 60fps and skip half at "ipcFrameOutVpssToHost" link and camera output resolution is 640x360 to decrease sclr loading. Are there any suggestion can be optimal the latency at any transfer stage? Thank you very much!

Jacson

  • Hello,

    What is the software release that you are using here?

    BR
    Margarita
  • Hi,

    We are using IPNC RDK 3.8.

    BR
    Jacson
  • Hello,

    I will notify the IPNC team for help.

    BR
    Margarita
  • Hi Margarita,

    Thanks for your help.

    BR
    Jacson
  • Hi
    The sclr link latency is about 6~10msec. I also try usecase "camera->display", the glass to glass latency is about 60msec, so the camera seems not occupy more time. The yuv data size is 640x360x2x30x8 bps. Is it my bottleneck? I find the data size effect latency very much. How can I improve this latency?

    Thanks,
    Jacson
  • Hi TI expert,

    Do you have any idea?

    Thanks,
    Jacson
  • Hi,

     

    You can roughly find out the frame latency in the system by adding the following code in the ..\ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_common\ipcFramesOut\ipcFramesOutLink_tsk.c file:

     

    Int32 IpcFramesOutLink_processFrameBufs(IpcFramesOutLink_Obj * pObj)
    {
        System_LinkInQueParams *pInQueParams;
        FVID2_FrameList bufList;
        FVID2_Frame *pFrameBuf = NULL;
        SystemIpcFrames_ListElem *pListElem;
        Int32 status;
        Int32 bufId;
        UInt32 curTime;
        FVID2_FrameList freeFrameBufList;
        UInt8 queId;
        UInt32 sendMsgToTsk = 0;
        UInt32 chPerQueue;
        IpcFramesOutLink_ChObj *pChObj;
     UInt32 frameLatency;

        pInQueParams = &pObj->createArgs.baseCreateParams.inQueParams;

        bufList.numFrames = 0;
        System_getLinksFullFrames(pInQueParams->prevLinkId,
                                pInQueParams->prevLinkQueId, &bufList);

        freeFrameBufList.numFrames = 0;
        curTime = Utils_getCurTimeInMsec();
        if (bufList.numFrames)
        {
    #ifdef SYSTEM_DEBUG_IPC_RT
            Vps_printf(" %d: IPC_FRAMES_OUT   : Received %d framebufs !!!\n",
                       Utils_getCurTimeInMsec(), bufList.numFrames);
    #endif

            UTILS_assert(bufList.numFrames <= FVID2_MAX_FVID_FRAME_PTR);
            pObj->stats.recvCount += bufList.numFrames;
            sendMsgToTsk = 0;
            chPerQueue =
                (pObj->numCh / pObj->createArgs.baseCreateParams.numOutQue);

    #ifdef IPC_FRAMES_IN_ENABLE_PROFILE
            Utils_prfTsBegin(pObj->stats.tsHandle);
    #endif                                                     /* IPC_FRAMES_IN_ENABLE_PROFILE
                                                                */
            pObj->totalFrameCount += bufList.numFrames;
            for (bufId = 0; bufId < bufList.numFrames; bufId++)
            {
                Bool          doFrameDrop;

                pFrameBuf = bufList.frames[bufId];
                UTILS_assert(pFrameBuf != NULL);

       frameLatency = Utils_getCurTimeInMsec() - pFrameBuf->timeStamp;
       Vps_printf("#### Frame Latency = %d msec\n",frameLatency);

    .

    .

    .

     

    regards,

    Anand

  • Hi Anand,

    Thanks your reply, but I know this method to measure the latency from camera link dequeue frame to next links. The sclr link process latency is around 6~10msec. My link is "camera->sclr->ipcFrameoutVpsstoHost->ipcFrameInHost", the both link ipcFrameoutVpsstoHost and ipcFrameInHost should not take much more latency, and the glass to glass latency of usecase "camera->display" is also about 60msec, so if we estimate the driver to camera 45msec, which stage possible can optimal the latency? How to do it?

    Thanks a lot.

    Jacson