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.

[DM8168] A new usercase from Vcap+Vdis, instead of the capture with IpcFramesOutHost and IpcFramesInVpss, Can't get get picture!

Hi all

      I modify the Vcap+Vdis demo,  delete the capturePrm. add the following statements.

ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
 ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
 ipcFramesOutHostPrm.baseCreateParams.numOutQue = 1;
 ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;
 ERIC_setIpcFramesOutInQueInfo(&ipcFramesOutHostPrm.inQueInfo);

 ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
 ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;
 ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
 ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesInVpssFromHostPrm.baseCreateParams.numOutQue = 1;
 ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLink = gVcapModuleContext.nsfId[0];

 Then add a task to read a YUV422 file and use function Vdis_putFullVideoFrames()  to put  the frame to pObj->ListMPOutHndl. But the ipcFramesInVpssLink can't get frame.   The variable "numFrameBufs" in function IpcFramesInLink_processFrameBufs()  always 0.  Why?   

 

  • Hi all

        I change the chain to test whether the frames are pass to the next Link correctly. Now the chain is :  

    ipcFramesOutHostToVpss->ipcFramesInVpssFromHost->ipcFramesOutVpssToHost->ipcFramesInHostFromVpss.
     

       The red two Links are used to reveive the frame back to write it to output file.   The ipcFramesInHostFromVpss link can get frames.  But the order of frames are  not the same as ipcFramesOutHostToVpss link send? How to make sure the receive link can get the frames as the same order as the source link send them?

     

        Thanks in advance!

        Eric!

      

  •   This problem is solved!

  • Hi Eric,

    could you pls. share with us, how you solved the problem. Can you send video frames form the host to the video core? I'm struggling with the same here...

    Trying to use Vsys_allocBuf to allocate a VIDFrame_BufList and then calling IpcFramesOutLink_putFullVideoFrames to send the frames from  SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0 to SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_IN_0, but without success.

  • Can you let us know what is the issue you are facing. Pls provide full console logs and your usecase file where the connection between links are setup for analysis of the problem

  • Badri,

    it's a custom DM814x design which currently has no video capture (network DVR), but the next hardware release will have capture too. 

    DVR_RDK_BOARD_TYPE=DM814X_TI_EVM works for our custom design (execpt for the missing video decoder chips, which is not a great issue.) 

    So I'm using use-case 814x 8CH DVR, but need to replace video capture by a dummy. So my input is ipcFramesOutHost -> ipcFramesInVideo and then the supplied 8CH use-case.

    On the host (A8) I use Vsys_allocBuf to allocate frame memory and IpcFramesOutLink_putFullVideoFrames to put the frames downstream. Then, in an endless loop, I'm calling IpcFramesOutLink_getEmptyVideoFrames. I get my allocated frames back, i.e. phys addresses are the same, but virtual addresses are NULL.  So, I'm using mmap and munmap API to get virtual addresses, re-fill the frames and send them out by using IpcFramesOutLink_putFullVideoFrames again and again.

    Meanwhile, this scenario is working, but I was wondering if this is the correct way / expected behaviour. I'm feeling not very comfortable by using such a mixture of APis.

    Kind regards

    Joseph

  • The changes you have done are correct.

    -- Vsys_allocBuf allocates a physically contiguous buffer

    -- IpcFramesOutLink_putFullVideoFrames  queues the allocated frame to VIDEO_M3

    -- IpcFramesOutLink_getEmptyVideoFrames then tries to get back the processed frame back from VIDEO_M3.

    If you want to simulate a Capture link it may be simpler to use a NullSrc link instead of using IpcFramesOut from A8.

    The virtual address is generally not populated by the ipcFramesInLink since application may not require the virtual address and would mostly use DMA to access the video frame in the final application as CPU copy of VIdeo frame will be very expensive. If you want ipcFramesInLink to populate the virtualAddress, set ipcFramesInLink.exportOnlyPhyAddr = FALSE in the create params of ipcFramesInHLOS link 

  • Badri,

    thanks for your fast reply. exportOnlyPhyAddr is for ipcFramesIn on host, but I have ipcFramesOut on host.

  • Sorry reply later.  Following code is used in my usecase to malloc frame space for ipcFramesOutHLOS Link


        frameSize = MCFW_IPCBITS_GET_YUV422_FRAME_SIZE(minChWidth,minChHeight);
        memset(frameObj,0,sizeof(VdecVdis_IpcFramesBufObj) * numFrames);
        for (i = 0; i < numFrames;i++)
        {
            status = Vsys_allocBuf(MCFW_IPCFRAMES_SRID,frameSize,MCFW_IPCFRAMES_FRAME_BUF_ALIGN,&bufInfo);
            if (ERROR_NONE == status)
            {
                EricSd_ipcFramesInitFrame(&frameObj[i],&bufInfo,minChWidth, minChHeight);
            }
      else
      {
       break;
      }
        }