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.

In AlgLink_ScdAlgCopyFrame, pEmptyFrame release fail!

In rdkdvr 4.0, AlgLink_ScdAlgCopyFrame, there are some code:

Utils_queGet(&pChObj->scdProcessObj.freeQ, (Ptr*)&pEmptyFrame, 1, BIOS_NO_WAIT);

.......

status = Utils_quePut(&pObj->processQ, pEmptyFrame, BIOS_NO_WAIT);
if(status!=FVID2_SOK)
{
           /* cannot submit frame now process queue is full, release frame to free Q */
          pChObj->inFrameUserSkipCount++; 

          status = Utils_quePut(&pChObj->scdProcessObj.freeQ, pEmptyFrame, BIOS_NO_WAIT);

           /* this assert should never occur */
          UTILS_assert(status==FVID2_SOK);

           return FVID2_SOK;
}

 Utils_quePut(&pObj->processQ, pEmptyFrame, BIOS_NO_WAIT);  will return FVID2_SOK! so it cann't release pEmptyBuffer!, Because Utils_queGet won't get pEmptyFrame, it will be NULL!

Why?

  • This means that either scd processing is blocked or happening slow. Is this with your custom use case or with standard release use case? Which platform?

  • Hi Sivagamy:

    Thanks. 

    I using my custom usecase under RDKDVR 4.0.

  • 1. If you have JTAG connection, connect via CCS & check how AlgLink_ScdalgProcessData() proceeds. This will give some clue on what's wrong.

    2. Modify use case to elimiate process Link (SCD Link) and check if rest of your data pipeline works fine.

  • Hi Sivagamy:

    I want to process frame data in AlgLink_ScdAlgCopyFrame, as I need about 25ms to process per frame.

    So i think that i need to do that at AlgLink_ScdAlgCopyFrame.

    Is it right?

  • Its not clear to me.

    1. Are you using scdLink_alg.c as is from standard release?

    2. In your use case, do you get few frames processing via scd an later get into this trouble of Utils_quePut(&pObj->processQ, pEmtryFrame,....) failing?

    3. Could you explain more on this statement? 

          I want to process frame data in AlgLink_ScdAlgCopyFrame, as I need about 25ms to process per frame.

    4. Can you share your use case - data flow diagram ?

  • Thanks.

    1. Are you using scdLink_alg.c as is from standard release?

    yes

    2. In your use case, do you get few frames processing via scd an later get into this trouble of Utils_quePut(&pObj->processQ, pEmtryFrame,....) failing?

    success. and pEmptyFrame is ok

    3. Could you explain more on this statement? 

          I want to process frame data in AlgLink_ScdAlgCopyFrame, as I need about 25ms to process per frame.

      I process frame data in AlgLink_ScdAlgCopyFrame, for each frame data, it need about 25ms to finish.

    4. Can you share your use case - data flow diagram ?

    SYSTEM_LINK_ID_CAPTURE->SYSTEM_LINK_ID_DEI->SYSTEM_VPSS_LINK_ID_DUP->SYSTEM_LINK_ID_NSF->SYSTEM_VPSS_LINK_ID_MERGE->SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT->SYSTEM_DSP_LINK_ID_IPC_FRAMES_IN->SYSTEM_LINK_ID_ALG

  • Is the last link in your chain ALG link? Your use case diagram seems incomplete. Please refer the usage of alg link in standard use case. 

    Find below some detail on links - this will help to understand how alg link works (process link)

    What's the different between processLink and nextLink ?

     -- If the output buffer of link A is sent to link B , and when linkB returns the output buffer back to linkA if buffers are freed then it is nextLink.Below is how linkA and linkB are connected:

      linkA ---> linkB

     -- In process link, connection is as below

    linkA ---> linkC
    |
    v
    linkB

         As you can see it is like a "T" connection.

        Here link C is the process link

        ProcessLink is used when the linkC does not have a output buffer but instead does the operation on the input buffer. For example SWOSD adds a grpx logo on the input video frame and returns the video frame.

  • In my usecase,

    LinkA(SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0)---->linkC(SYSTEM_VPSS_LINK_ID_IPC_OUT_M3_0)

    |
    v

    linkB(SYSTEM_DSP_LINK_ID_IPC_FRAMES_IN_0)

    I can get frame data.

    But when I move camera, the frame UV data will be wrong, 

    I suspect that there is not enough time to do 704x576 frame. right?

  • There cannot be a data corruption issue due to delay process link unless there is some issue in connecting links.

    If a link introduces delay, frames will be dropped in a real time capture use case.

    SCD processing does not modify the data. Still I have not got a complete picture of your use case. Please refer mutich_progressive_vcap_venc_vdec_vdis.c to understand the usage of FRAMES_OUT (M3) / FRAMES_IN (DSP) / AlgLink.

     

  • Sorry

    In static status, the display'd frame is ok. But when I move camera, the picture is like:

    so I think that usecase config is correct, right?

  • Does statistics print show full fps (all links running fine) on static camera case?