diff options
author | Clément Bœsch <clement@stupeflix.com> | 2014-07-16 16:42:42 +0200 |
---|---|---|
committer | Clément Bœsch <clement@stupeflix.com> | 2014-08-18 14:13:57 +0200 |
commit | b0352b1997a83f1b6b27919b94aab539f099b25b (patch) | |
tree | 5d7f4f64a17d8f0ec623eb101755f6e9fe036ff8 /libavutil/frame.h | |
parent | c5f43c8888400f5fab6f7d2ad27e961e8d2616a5 (diff) | |
download | ffmpeg-b0352b1997a83f1b6b27919b94aab539f099b25b.tar.gz |
avcodec: export motion vectors in frame side data on demand
The reasoning behind this addition is that various third party
applications are interested in getting some motion information out of a
video "for free" when it is available.
It was considered to export other information as well (such as the intra
information about the block, or the quantization) but the structure
might have ended up into a half full-generic, half full of codec
specific cruft. If more information is necessary, it should either be
added in the "flags" field of the AVMotionVector structure, or in
another side-data.
This commit also includes an example exporting them in a CSV stream.
Diffstat (limited to 'libavutil/frame.h')
-rw-r--r-- | libavutil/frame.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/frame.h b/libavutil/frame.h index dbbdd29d1b..2391d3e48e 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -87,6 +87,13 @@ enum AVFrameSideDataType { * in ETSI TS 101 154 using AVActiveFormatDescription enum. */ AV_FRAME_DATA_AFD, + /** + * Motion vectors exported by some codecs (on demand through the export_mvs + * flag set in the libavcodec AVCodecContext flags2 option). + * The data is the AVMotionVector struct defined in + * libavutil/motion_vector.h. + */ + AV_FRAME_DATA_MOTION_VECTORS, }; enum AVActiveFormatDescription { |