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.

DM814x EZSDK H264 Motion Vectors

Hi folks,

The application that I am working on requires the use of H.264 motion vectors.  I have a few questions about this capability:

1. Is the Motion Vector feature available in the H.264 codec provided with EZSDK?  It is documented in Appendix D of the H264_Encoder_HDVICP2 User Guide that is supplied with EZSDK but, so far, it has not been possible to determine how to enable it in the EZSDK by passing parameters to the VIDENC2_create() function.

2. Currently we are using a gstomx based pipeline.  When motion vectors are enabled, are they exposed to the user application via the gstomx interface or are they provided directly by the codec?

3. Does the value of encodingPreset parameter determine whether motion vectors are enabled or not?

Thanks in advance,

Regards,

Terry

  • I'd be interested to hear the answers to a few of these questions too. Can anybody at TI help?

  • Hello,

    Regarding the Motion Vector and SAD Access API (H264_Encoder_HDVICP2_UserGuide.pdf):


    When enableAnalyticinfo = 1 is set (tStaticParam.videoStaticParams.h264EncStaticParams.enableAnalyticinfo = 1,  it should write the MV and SAD information to the OMX output buffer. And it should be able to access in FillBufferdone call backs.

    The h264 doc says that if you enable Analytics, codec returns the numBufs =2.

    You could check what is the value that is return?

    Best Regards,

    Margarita


     
  • Hello Margarita,

    Thanks for your reply concerning the motion vectors.  We have now made some progress.  In addition to the enableAnalyticinfo flag being set to 1 we have found that we also need to set the encodingPreset parameter for the H.264 encoder to XDM_USER_DEFINED.  When we do this, the value of numBufs returned is now 2 indicating that the analytics data is now present.

    From looking at a hex dump of the analytics data, the format looks to be slightly different to that decribed in the H264 Encoder user guide document that we are using (SPRUGN2 - October 2011 - the H.264 encoder version that we are using is 2.0.2.2).

    The document defines the Analytics the ElementInfo structure as:

    typedef struct {

    /*Starting position of data from the buffer base address*/

    U32 StartPos;

    /* No. of bytes to jump from the current position to get the next data of this element group */

    U16 Jump;

    /* Number of data elements in this group */

    U16 Count;

    }ElementInfo;

    However, we are finding that a definition of:

    typedef struct ElementInfo {  

    /*Starting position of data from the buffer base       address*/  

    U32 StartPos;  

    /* No. of bytes to jump from the current position to     get the next data of this element group */  

    U32 Jump;  

    /* Number of data elements in this group */  

    U32 Count; } ElementInfo;

    Is there an error in our document or is there some aspect of the structure definition that we are msiing?

    Thanks,


    Regards,

    Terry

  • Hello,

    Terry Neill said:
    In addition to the enableAnalyticinfo flag being set to 1 we have found that we also need to set the encodingPreset parameter for the H.264 encoder to XDM_USER_DEFINED.  When we do this, the value of numBufs returned is now 2 indicating that the analytics data is now present.

    Correct.

    “enableAnalyticInfo” is extended field of create time parameters, and any extended parameter given by user comes into effect ,if encoding preset is USER_DEFINED.

    So to get mv/sad you will have to set encoding preset to USER_DEFINED, and set the all other extended parameter as default.

    Terry Neill said:
    Is there an error in our document or is there some aspect of the structure definition that we are msiing?

    I am not sure. It would  be better to post the query in Multimedia codecs forum, may be they can helps or you could contact your local FAE  for support.

    Best Regards,

    Margarita