diff options
author | Zhong Li <zhong.li@intel.com> | 2019-08-13 14:11:07 +0800 |
---|---|---|
committer | Zhong Li <zhong.li@intel.com> | 2019-08-20 13:34:01 +0800 |
commit | f115a2b7635d9e47b1299661ddaa6ac2386e9db1 (patch) | |
tree | 24f85588649c6b8d02ca48436013adc3a5bc7c49 /libavcodec/qsv.c | |
parent | 1b0a8e48f1d710800d2bd85795cfb3e93f28ab32 (diff) | |
download | ffmpeg-f115a2b7635d9e47b1299661ddaa6ac2386e9db1.tar.gz |
lavc/qsvdec: add function ff_qsv_map_picstruct()
Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavcodec/qsv.c')
-rw-r--r-- | libavcodec/qsv.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 986d4f6022..437ef7ca75 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -245,6 +245,24 @@ int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame) return AVERROR_BUG; } +enum AVFieldOrder ff_qsv_map_picstruct(int mfx_pic_struct) +{ + enum AVFieldOrder field = AV_FIELD_UNKNOWN; + switch (mfx_pic_struct & 0xF) { + case MFX_PICSTRUCT_PROGRESSIVE: + field = AV_FIELD_PROGRESSIVE; + break; + case MFX_PICSTRUCT_FIELD_TFF: + field = AV_FIELD_TT; + break; + case MFX_PICSTRUCT_FIELD_BFF: + field = AV_FIELD_BB; + break; + } + + return field; +} + enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type) { enum AVPictureType type; |