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.

DM365: Motion vector and SAD output from h264 encoder

Hello,

I'm trying to use motion vector and SAD data provided by h264 encoder, but I can't make any sense from the data I receive. After calling process, the index 1 buffer should contain data in this format:

struct MotionData {
short MVx;
short MVy;
int SAD;
};

After calling the algorythm process() function, the correct buffer is filled with data. Correctly the data size is width/16 * height/16 * 8. But I can't make sense of the buffer content.

It seems that MVy is always 0, SAD is "strange"... Perhaps someone can explain me how to read this data...

This is an hex dump of a part of the data:

00000000  d6 1f 00 00 09 00 00 00  08 01 00 00 01 00 00 00
00000010  ec 00 00 00 01 00 00 00  f2 00 00 00 01 00 00 00
00000020  d6 00 00 00 01 00 00 00  49 02 00 00 00 00 00 00
00000030  b1 04 00 00 00 00 00 00  63 04 00 00 00 00 00 00
00000040  1e 04 00 00 ff ff 00 00  19 04 00 00 00 00 00 00
00000050  77 04 00 00 00 00 00 00  a7 04 00 00 00 00 00 00
00000060  86 04 00 00 00 00 00 00  fb 03 00 00 00 00 00 00
00000070  7a 04 00 00 00 00 00 00  e4 04 00 00 00 00 00 00
00000080  59 04 00 00 00 00 00 00  e3 02 00 00 00 00 00 00

...

  • Hi,

    What is the version of H.264 Encoder that you are using? There is a known issue that we found in last 1-2 months about the output format of MV data output from H.264 codec.

    I asume you have an older version of H.264 codec (that comes with DVSDK 2.10.01.18) and in that codec, please use the following structure to understand SAD values:

     

    struct MotionData {
    int SAD;
    short MVx;
    short MVy;
    };

    The codec is outputting in this format in the older releases, although the documentation suggests the way you were using.

    We have fixed it in codec now and in the newer releases, you can move back to your original structure.

    Regards,

    Anshuman

     

  • Hi,

     

    thanks for your reply. I confirm I'm using dm365_codecs_01_00_06 from dvsdk_2_10_00_17. Internal version for h264 encoder is 1.00.00.18. Where do I find the newser version of the encoder? Is it already released?

    Thanks!

  • Hi Marco,

    I dont think the new codec or DVSDK is available for release yet. You might want to contact your local TI contact.

    You can still use old codec by just changing the structure.

     

    Regards,

    Anshuman