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. How to discard frame by display link (HDMI)

Hello TI' teams,

Works very simple use-case on DM8148 and latest version of dvr-rdk:

CaptureLink (VIP0) -> DSP/ALG (as processing link) -> SwMosaicLink -> DisplayLink (HDMI)

How DSP/ALG link may say to display link that currently processed frame must be discared by display?

Is this possible?

FVID2_Frame structure hasn't appropriate filelds

                        

  • Hi,

    You cannot discard currently displaying frame. If you already know that frame has to be discarded, you just don't enqueue to the display link.
    There is no other way. Once you enqueue to the display link, it will be displayed.

    Regards,
    Brijesh
  • Hello Brijesh,
    Thanks a lot for yuor answer. I means: mark frame currently processed by DSP/ALG link that this frame must be discarded by display link.
  • Hi,

    If you already know in your algorithm that frame needs to be discarded, then you just dont forward that frame to the next link (display link).

    Regards,
    Brijesh
  • Hi, itsn't exact. My DSP/ALG link connected in use-case as process link between capture and SwMs&Disp, so I havn't "next link" connected to DSP and in any way after algorithm completed, buffer must be returned to previous link for avoid plugs in use-case. But not found any way, how to mark this buffer "not displayed",before return it to previous link.

  • Hi Marat,

    This is not about input buffer. you have to return input buffer in any case ie whether output is generated or output is invalid..
    This is about output frames which are allocated by your link. If the output frame is generated with the valid content, you could forward it to the next link. If output is not generated or if it does not contain valid contents, just dont forward to the next link. You could just enqueue it back to your local free queue.

    Rgds,
    Brijesh
  • Hi Brijesh,
    my DSP/ALG link isn't allocate buffers, and use buffers allocated by capture link. After processing (image correction and enhancement) input buffer content modifyed by DSP/ALG and returned back to HDVPSS/previous link for display.
  • Hi Marat,

    I still dont see any problem.

    You get the capture buffer, you update it and enhance it based on certain parameters in your algorithm and then send it to the display. You return that buffer back to the capture link only when it is returned back from the display link. Again here, if you dont want to display current frame, you could return it back to the capture link without forwarding to the display link.

    Regards,
    Brijesh
  • Hi Brijesg,
    I'm very glad for your reply and explanation. Maybe this is misunderstanding from my side, but in my DSP/ALG link buffer after processing returned back by next API (pay attention plz , DSP/ALG connected as process link):


    System_putLinksEmptyFrames(pInQueParams->prevLinkId,  pInQueParams->prevLinkQueId,  &pObj->inBufList);


    I don't clearly understood, if my DSP/ALG link known only one link ID - prevLinkId, how I can in one case  return back buffer to capture link or in other case send it to dipslay? Maybe I don't exactly understood how to works process link connection?
    My DSP/ALG link conected to use-case and works with buffers exact as SWOSD/ALG link supplied by TI.

  • Hi Marat,

    Have you implemented your DSP/Alg link as a link? Each link gets input buffer from the previous link whose id is stored in prevLinkId and sends the processed buffer to next link whose id is stored in the nextLinkId..

    To send the buffer to the next link, you need to put the buffer to the output queue and send NEW_DATA command to the nextLinkId. To send back the input buffer, you need to call putLinkEmptyframes for prevLinkId.

    Please go through one of the link implementation to get the idea about the this framework


    Regards,
    Brijesh
  • Yes, my Alg link works with buffers and connetced to use case exact as ALG/OSD link owned by TI.
    I havn't next link ID, only previous link Id. Please see TI/DSP-ALG link implementation into dvr-rdk, files : dvr_rdk/mcfw/src_bios6/links_c6xdsp/alg_link/algLink_priv.h and dvr_rdk/mcfw/src_bios6/links_c6xdsp/alg_link/algLink_tsk.c
    My ALG link connected to use case as is:

    Capture -> ipcFramesOutVpss -> (processLink) -> SwMs -> display
                                                                           |
                                                       DSP IPC In Video
                                                                           |
                                                          DSP/ALG link

    // VPSS IPC OUT[0] video parameters
    vpssIpcOutPrm[0].baseCreateParams.inQueParams.prevLinkId = captureLinkId;
    vpssIpcOutPrm[0].baseCreateParams.inQueParams.prevLinkQueId = 0;
    vpssIpcOutPrm[0].baseCreateParams.notifyPrevLink = TRUE;
    vpssIpcOutPrm[0].baseCreateParams.numOutQue = 1;
    vpssIpcOutPrm[0].baseCreateParams.outQueParams[0].nextLink = swMosaicLinkId[HDMI_DISPLAY];
    vpssIpcOutPrm[0].baseCreateParams.notifyNextLink = TRUE;
    vpssIpcOutPrm[0].baseCreateParams.processLink = dspAlgIpcInLinkId;
    vpssIpcOutPrm[0].baseCreateParams.notifyProcessLink = TRUE;
    vpssIpcOutPrm[0].baseCreateParams.noNotifyMode = FALSE;
    vpssIpcOutPrm[0].baseCreateParams.inputFrameRate = 30;
    vpssIpcOutPrm[0].baseCreateParams.outputFrameRate = 30;

    When I tried to implement my DSP/ALG link with output queue I have a problem send processed buffer back to HDVPSS module for displaying, this is my old thread described the problem:

    So I'm implememted my own DSP/ALG link exact as DSP/SWOSD-ALG link implemented by TI' teams- without output queue, and buffers recieved and returned back via inQueueParams to prevLinkId (please see TI' implemetation "AlgLink_algProcessData" from dvr_rdk/mcfw/src_bios6/links_c6xdsp/alg_link/algLink_priv.c file)

  • hi Marat,

    I am not sure about your this alg link architecture, but if you see even processLink is connected on one hand to ipc link and on the other hand to swms link. so it does have prevLinkId, which will be ipc link id and next link id, which will swms  link id. 

    Rgds,

    Brijesh

  • Ok, I'm insert into FVID2_Frame structure my custom field, copy the field in IPC_IN/OUT-link and check it in DisplayLink for decide accept buffer for displaying or reject. Works fine, this thread may be closed.