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.

TDA2EVM5777: Simultaneous access of buffer from different links

Part Number: TDA2EVM5777

Hi,

I have a similar use-case as posted in the original query.

NullSrc(A15) -> Decode(IPU) -> Alg_preproc(A15) -> Alg_proc_a (EVE) -> Alg_postproc(A15) -> Display(IPU).

Out of these alg plugin links

        preproc and postproc work in "NOT_IN_PLACE" mode
        proc_a work in "IN_PLACE" mode.

The input frame rate is 10fps.
Video on Display is smooth when the usecase is run for the first time. But if I stop the usecase and start it again, video on the display is jerky.

While debugging we found that the video buffer (output buffer of preproc) is being picked up for processing in preproc link (from emptyQ) even before it gets used/released from postproc link.

Please help to point out what can be causing this issue.

Thanks in advance,

Regards,
Uday M S

  • ~: /u1/uday/debug$ grep 0xa5426800 first.txt

    (This is the Expected Order for every buffer)

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    ...

    ---------------------------------------------------------------------------------------------------------------------------------

    ~:/u1/uday/debug$ grep 0xa5426800 second.txt

    (Unexpected behaviour in bold)

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    ...

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    PREPROC_LINK GET 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    PREPROC_LINK GET 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800
    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    PREPROC_LINK GET 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800
    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800

    PREPROC_LINK GET 0xa5426800
    ALG_LINK_SUPPORT OSA_quePut 0xa5426800
    PREPROC_LINK GET 0xa5426800
    POSTPROC_LINK RELEASE 0xa5426800

  • Hi,

    Please take care of your link buffer management.

    Until you, inside your link put the buffer to empty queue, it will be available in output full queue only and empty queue will be empty.

    Please refer other alg link with INPLACE and NOT IN Place mode.

    Regards,

    Anuj

  • Hi Anuj,

    We have verified our algorithms with the examples in the vision sdk package.

    As seen in the logs attached, the AlgorithmLink_releaseOutputBuffer in algorithmLink_algPluginSupport.c is getting called before it is released from our algorithm link.

    Can you please suggest other areas to look into ?

  • Hi,

    Is it possible for you to remove your 2 alg link and test with 1 link only at a time.

    So you have to test your usecase 3 times with 3 different links with 1 at a time.

    You can ignore your processing inside your link and just concentrate on of buffer management.

    In this way you can debug.

    Regards,

    Anuj

  • Hi Anuj,

    The issue is not seen when the use-case is run for the first time (Issue is seen when the use-case is stopped and started again).
    So can we think that the buffer management is fine?

    The issue is seen even when System_deInit(UInt32 shutdownRemoteProcs (= FALSE)) is invoked, application is started again and use-case is run.
    If the System_deInit(UInt32 shutdownRemoteProcs (= TRUE)) is invoked, we will not be able to run the use-case till the Hardware is re-booted.

    So can you please let me know if there is any way we can restart the remote processors ?

    Regards,
    Uday M S
     

  • Hi,

    I hope you are using linux.

    So can you tell me how you are restarting the whole linux system?

    or you are only restarting this apps.out.

    Regards,

    Anuj

  • Yes, We are using Linux

    To restart the linux system, I'm powering OFF the Hardware and powering it ON

  • Hi ,

    Any update in this ?

  • Hi,

    If you just want to rerun the usecase then why you are calling system_deInit()

    You just stop the usecase by pressing 0 and start it again.

    Can you explain the reason behind calling system_deInit()?

    Regards,

    Anuj

  • Hi Anuj,

    When we stop the use-case and start it again, the issue was observed.

    Hence we have tried calling System_deInit to check if there is any change in behavior.

  • Hi,

    Out TI team(Anuj & me) had a call with your team

    I hope you make a progress after that call.

    Thanks

    Gaviraju

  • Hi Gaviraju,

    We were busy with a customer release activity this week, hence couldn't work on this issue.

    We will be taking it up again next week.

    Regards,
    Uday M S

  • Okay keep us posted

    Thanks

    Gaviraju