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.

DVR RDK frame out chain

Hi, my hardware = ti8168 + vc daughter board.We have worked on DVR RDK for 3 weeks, and we need the decoder to read encoded bit stream and then output frames to ARM. We read the MCFW demos and make some changes on VDEC-VDIS demo:

The origin links chain:

BitOutHost-BitInVideo-DEC-OutVideo-InVpss-Dup-2SWMOSAIC-2Displays

The changed links chain:

BitOutHost-BitInVideo-DEC-OutVideo-InVpss-Dup-FrameOutVpss-FrameInHost

The results are:

 [host] TI_VDEC:Entered function:Vdec_ipcFramesInCbFxn

 [host] Vdec_ipcFramesInCbFxn

 [host] MCFW_IPCFRAMES:Received first frame notify...

 [host] TI_VDEC:Entered function:Vdec_getFullVideoFrames

 [host]

 [host] TI_VDEC:Leaving function:Vdec_copyVidFrameInfoLink2McFw

 [host] VidFrameInfo:virt[0][0]:(nil),phy[0][0]:0x20,channelNum:0,fid:0,frameWidth:1920,frameHeight:1080,timeStamp:0,

 [host] TI_VDEC:Leaving function:Vdec_getFullVideoFrames

 [host] NumFrames Received:1

 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:1

 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:0     virtAddr[0][0]:(nil)    phyAddr[0][0]:0x20

 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:EmptyFrameList numFullFrames:1

 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:0     virtAddr[0][0]:(nil)    phyAddr[0][0]:0x20

 [host] TI_VDEC:Entered function:Vdec_putEmptyVideoFrames

 [host] Num bufs released:1

 [host] TI_VDEC:Leaving function:Vdec_copyVidFrameInfoMcFw2Link

 [host] VidFrameInfo:virt[0][0]:(nil),phy[0][0]:0x20,channelNum:0,fid:0,frameWidth:1920,frameHeight:1080,timeStamp:0,

 [host] TI_VDEC:Leaving function:Vdec_putEmptyVideoFrames

 [host] VIDFrame release status:0

 [host] MCFW_IPCFRAMES:VdecVdis_ipcFramesRecvFxn:INFO: periodic print.. [m3video] Ch number:0 InputFPS :30, trickPlay outputFrameRate: 30

 

 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:1

 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:33    virtAddr[0][0]:(nil)    phyAddr[0][0]:0x820

 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:EmptyFrameList numFullFrames:1

 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:33    virtAddr[0][0]:(nil)    phyAddr[0][0]:0x820

 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:1

 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:66    virtAddr[0][0]:(nil)    phyAddr[0][0]:0x1020

 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:EmptyFrameList numFullFrames:1

 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:66    virtAddr[0][0]:(nil)    phyAddr[0][0]:0x1020

 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:1

 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:99    virtAddr[0][0]:(nil)    phyAddr[0][0]:0x1820

 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:EmptyFrameList numFullFrames:1

 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:99    virtAddr[0][0]:(nil)    phyAddr[0][0]:0x1820

 

As the results show, the physical address is wrong(0x20,0x820,0x1020,0x1820). Is the changed links chain correct? If not, how to get frame in A8 from video decoder?

  • Xiaotao,

    As you have said " we need the decoder to read encoded bit stream and then output frames to ARM" you need not send the data to vpssm3. Your chain can be as simple as

    BitOutHost-BitInVideo-DEC-IpcFramesOutVideo-IpcFramesInHost

    You have to involve vpssm3 only if you need to display or scale the decoded content. In that case the chain that you have created should work if you have display link also connected as shown below.

    BitOutHost-BitInVideo-DEC-OutVideo-InVpss-Dup ---- FrameOutVpss-FrameInHost
                                                                                          |
                                                                                    SWMS ---- Display
                                                                                 (optional)

    Regards,

    Yogesh. 

    P.S. please mark the verify answer if you think this post has answered your question

     

     

  • Hi, I am afraid my chain is exactly what you say:

    BitOutHost-BitInVideo-DEC-OutVideo-InVpss-Dup ---- FrameOutVpss-FrameInHost
                                                                                     |
                                                                                 SWMS ---- Display
    As you konw, the origin chain has two display outputs, so we just modify one of them.

    we want to exchange frames using PCI-e,but we don`t know how to get frames in A8(as you see, the physical address is strange).

  • Xiaotao,

    You can refer to dvr_rdk\mcfw\src_linux\mcfw_api\usecases\multich_vcap_venc_vdis.c usecase for usage of IpcFrameOut/In/HLOS/RTOS. This will give you clear idea of how to use these links in your data flow

    Regards,

    Yogesh. 

    P.S. please mark the verify answer if you think this post has answered your question

     

     

     

     

  • hi, Yogesh, I know what you refer to. I have read about ipcFramesRecvFxn function.

    We get the frame out by Vdec_getFullVideoFrames(the origin is Vdis_getFullVideoFrames,we just change the name of the function and some variables),and then VdecVdis_ipcFramesPrintFullFrameListInfo(&bufList,"FullFrameList") to display frame information.

    Finally, we use Vdec_putEmptyVideoFrames(the origin is Vdis_putEmptyVideoFrames) to put the buffer back to the frameout link.

    As the information shows(the origin post), the physical address(0x20,0x820,0x1020,0x1820) is strange and I don`t know what`s wrong.

    Regards,

    Xiaotao

  • and i only find SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0,SYSTEM_DSP_LINK_ID_IPC_FRAMES_OUT_0 and SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0 in system_linkId.h, so, is there a frame out video link id?

  • Xiaotao,

    I'm finding it difficult to figure out why you are getting wrong addresses in IpcFrameInHLOS on A8. I will discuss this internally with the team and get back to you on that.

    Regarding your second question above there is no frame out video link id, videom3 is responsible for getting encode and decode operations done. At the out put, videom3 either sends out encoded bits stream through ipcBitsOut to A8 or decoded video through IpcOutM3. Usually decoded video is sent to vpssm3 for display and hence inter m3 link which is IpcOutM3 is used. You can choose to send this decoded video received via IpcInM3 from vpssm3 to A8 through IpcFramesOut or you can choose to try out IpcFramesOut directly from videom3 by adding SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0. I feel second approcach will be more efficient.

    Regards,

    Yogesh.

     

     

  • Yogesh,

    I`ve tried your advice but it still goes wrong. I add a SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0 but it stops at the creating of this link. Can TI provide a simple demo of this:

    BitOutHost-BitInVideo-DEC-IpcFramesOutVideo-IpcFramesInHost  OR

    BitOutHost-BitInVideo-DEC-OutVideo-InVpss-Dup ---- FrameOutVpss-FrameInHost
                                                                                          |
                                                                                    SWMS ---- Display
                                                                                 (optional)

    Thanks,

    Xiaotao.

  • Xiaotao,

    Sorry for delayed response. I was on leave last week. I discussed this issue interally and it came out that the physical address that you are observing at IpcFramesIn could be valid TILER space addresses. Can you please ensure you are using non-tiled memory for decoder?  You can do this by setting

    decPrm.tilerEnable = FALSE;

    and then print address on A8.

    Regards,

    Yogesh.

     

     

     

  • Yogesh,

    Thanks for your answer, I think the physical address is correct now. And I want to transport these decoded frames to another DSP using PCI-e, how to use the physical address?

    Regards,

    Xiaotao

  • Xiaotao,

    I dont know hiw PCI--e driver works. We would need help from lsp guys. To satrt with, Can you please check Release Notes from the lsp version you are using and see if this is supported?

    Regards,

    Yogesh.

     

     

  • Yogesh,

    I think PCI-e can work now. To start with, I want to write the decoded frames to a file.What to do with the physical addresses?

    Thanks,

    Xiaotao

  • Yogesh,

    I think the PCI-e works now.We now get the physical address like 0xa875c680,1:0xa89a8680;but I don`t know what to do with these addresses. Should I directly using these addresses in PCI-e function?

    Regards,

    Yogesh.

  • Xiaotao,

    Are you familiar with PCIe driver usage? I have not used it at all but I can get you to the documentation. This may give you a hint on what to do with these addresses. Please check if you can access this.

    http://processors.wiki.ti.com/index.php/TI81XX_PCI_Express_Root_Complex_Driver_User_Guide

    http://processors.wiki.ti.com/index.php/TI81XX_PCI_Express_Endpoint_Driver_User_Guide

    Which psp version you are on?

     

     

  • I think the problem is solved now, thank you very much.

    Regards,

    Xiaotao