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 visit frame data gotten from PCI-e module in M3 side

A single question about DVRRDK in TI8168.

If I have gotten one frame data from PCI-e module,that is, the frame data is in A8 side,how to put the frame into VideoM3 or VPSSM3 side?Or,how should I visit the frame data gotten from PCI-e module in M3 side?

Yours,

Xiaotao

  • You can use ipcFramesOutHLOS connected to ipcFramesInRTOS link on VIDEO_M3/VPSS_M3 to send the frame to M3.Pls refer code in /dvr_rdk/mcfw/src_linux/mcfw_api/usecases/multichhd_vcap_venc_vdis.c for example

  • You mean the code in Demo_vcap_venc_vdis_ipc_frames_exchange.c ? And the function is VcapVenc_ipcFramesSendRecvFxn:

    status = Vcap_getFullVideoFrames(&bufList,0);
    OSA_assert(0 == status);
    if (bufList.numFrames)
    {
    VcapVenc_ipcFramesPrintFullFrameListInfo(&bufList,"FullFrameList");
    status = Vdis_putFullVideoFrames(&bufList);
    OSA_assert(0 == status);
    }
    status = Vdis_getEmptyVideoFrames(&bufList,0);
    OSA_assert(0 == status);

    if (bufList.numFrames)
    {
    VcapVenc_ipcFramesPrintFullFrameListInfo(&bufList,"EmptyFrameList");
    status = Vcap_putEmptyVideoFrames(&bufList);
    OSA_assert(0 == status);
    }

    And Vdis_putFullVideoFrames and  Vdis_getEmptyVideoFrames do this work?

  • You will have to first create a chain (usecase file) connecting ipcFramesOutHLOS to ipcFramesInRTOS. You can then exchange frames using IpcFramesOutLink_putFullVideoFrames & IpcFramesOutLink_getEmptyVideoFrames directly. You dont have to use the mcfw APIs  Vdis_putFullVideoFrames and  Vdis_getEmptyVideoFrames . McFW APIs are built on top of the link APIs and meant to be used with standard predefined usecases

  • Thanks for your answering. I have found the 

    Int32 IpcFramesOutLink_putFullVideoFrames(UInt32 linkId,VIDFrame_BufList *bufList)

    function, and the variable needed is  VIDFrame_BufList type.

    In VIDFrame_Buf type definition,I find that both addr and phyAddr are there and there are also some parameters like frameWidth and frameHeight.

    If the frame data is from PCI-e module, I think only the addr is available.

    And in IpcFramesOutLink_copyFrameInfo function in ipcFramesOutLink_tsk.c in dvr_rdk\mcfw\src_linux\links\ipcframesout,the code is like:

    dst->phyAddr[fieldIdx][i] = src->phyAddr[fieldIdx][i];
    if (SYSTEM_MT_TILEDMEM ==
    pObj->info.queInfo[0].chInfo[dst->channelNum].memType)
    {
    srPtr[fieldIdx][i] = (SharedRegion_SRPtr)IPC_LINK_INVALID_SRPTR;
    }
    else
    {
    UInt16 srId;

    srId = SharedRegion_getId(src->addr[fieldIdx][i]);
    if(srId != SharedRegion_INVALIDREGIONID)
    {
    srPtr[fieldIdx][i] =
    SharedRegion_getSRPtr(src->addr[fieldIdx][i], srId);
    }
    else
    {
    srPtr[fieldIdx][i] = IPC_LINK_INVALID_SRPTR;
    }
    }

    OK,the physical address is copied,but in our case,only virtual address is available.

    Is it OK to just copy the received data to addr and still use IpcFramesOutLink_putFullVideoFrames function?

  • Application has to populate the physical address.The M3 expects physical address to be populated. To convert virtual to physical refer example code in

    /dvr_rdk/mcfw/src_linux/links/ipcBitsOut/ipcBitsOutLink_tsk.c

    IpcBitsOutLink_MapUsrVirt2Phy() function.

    Also I guess application will know the received frames width and height right ?