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.

motion detection on DM816x

Hi all, 

        I am facing a problem on motion detection with DM816x. 

         The way I use for motion detection is through analyzing MV & SAD output by H.264 encoder 02.00.00.04 with RDK 01.09.00.16.  I use link api and set enableAnalyticinfo to 1 in EncLink createParams.
         The chain is like:
         … -> EncLink_h264->ipcBitsOutVideo->ipcBitsInHost
         But I find that the Bitstream_buf passed to host is bitstream without MV & SAD data, because the mvDataOffset & mvDataFilledSize is zero.
        I digged the code a bit and found that outputBufDesc that passed to codec "process" call comes with numBufs = 1, which should be 2 if enableAnalyticInfo be
set to 1 according to H.264 codec datasheet.  Strange.
         Could anyone help me? Thanks.
  • Hi Rafael,

    If you have set enableAnalyticinfo to 1 in create params, codec expects the outBufs->numBufs >=2 or else it returns an error in the process(). Again the MVInfo buffer needs to be given as a seperate buffer apart from bitstream buffer.

    As you are not seeing process() failing with error, which hints that enableAnalyticinfo is not set in the EncLink somehow.

  • HI Venugopala,

        Thanks for hint. You are right that enableAnalyticinfo is not actually active in EncLink because encodingPreset is set to XDM_DEFAULT by EncLink regardless of the fact that it is set to XDM_USER_DEFINED in  createParams. Fixing the bug in EncLink solves my problem.

        BTW, I also see the bug gets fixed in RDK 02.00.00.23.

    Rafael