I'm using ffmpeg to extract motion vectors using the example doc extract_mvs.c
. Issue is that this code only seems to give a few pieces of information: frame number, size of macroblock, source (future or past), source (x and y), and destination (x and y).
Unfortunately, this doesn't say which frame the source comes from in the past or the future (it could come from both, from several past, or several in the future). It also doesn't say what the macroblock type is (which tells similarly useful info). For example, if Source (x and y) equals Destination (x and y) it is impossible to tell if that information is the same as the last frame or if it entered completely new information.
See lines 60-63 in the extract_mvs.c code in ffmpeg
Final question is that for MP4, motion vectors generally have quarter pixel resolution and the resolution given here is clearly rounded to the closest integer. How am I supposed to extract the "true" motion vector information before rounding?