mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
lavc/qsvdec: add function ff_qsv_map_picstruct()
Signed-off-by: Zhong Li <zhong.li@intel.com>
This commit is contained in:
parent
1b0a8e48f1
commit
f115a2b763
@ -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;
|
||||
|
@ -95,6 +95,8 @@ int ff_qsv_level_to_mfx(enum AVCodecID codec_id, int level);
|
||||
int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc);
|
||||
enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type);
|
||||
|
||||
enum AVFieldOrder ff_qsv_map_picstruct(int mfx_pic_struct);
|
||||
|
||||
int ff_qsv_init_internal_session(AVCodecContext *avctx, mfxSession *session,
|
||||
const char *load_plugins);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user