[FFmpeg-user] Usage of AVFrame::motion_val
Александр Куклин
shortloginsareeasilyremembered at gmail.com
Fri Apr 11 22:54:11 CEST 2014
Hello ffmpeg users!
How can I get and set specific motion vectors using the
AVFrame::motion_val? I do not understand the given example and the type of
motion_val. Is it an array of array of pointers? But why does it have
length of 2?
int16_t (*motion_val<http://ffmpeg.org/doxygen/1.2/structAVFrame.html#a8a9ff3a2d5f4191511f516bf0254300e>
[2])[2];
example:
int mv_sample_log2= 4 -
motion_subsample_log2<http://ffmpeg.org/doxygen/1.2/structAVFrame.html#a7cf84898ba50661889cbca26a528be0a>
;
int mb_width= (width<http://ffmpeg.org/doxygen/1.2/structAVFrame.html#a1e71ce60cedd5f3b6811714a9f7f9e0a>
+15)>>4;
int mv_stride= (mb_width << mv_sample_log2) + 1;
motion_val<http://ffmpeg.org/doxygen/1.2/structAVFrame.html#a8a9ff3a2d5f4191511f516bf0254300e>[direction][x
+ y<http://ffmpeg.org/doxygen/1.2/avf__showspectrum_8c.html#aa4f0d3eebc3c443f9be81bf48561a217>*mv_stride][0->mv_x,
1->mv_y];
More information about the ffmpeg-user
mailing list