From 52ed83fa1a7f5170447eff6fad0b6c57119596e9 Mon Sep 17 00:00:00 2001 From: Zhong Li Date: Wed, 4 Apr 2018 17:51:29 +0800 Subject: lavc/qsvdec: expose frame pic_type and key_frame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently pict_type and key_frame are unset. Add an extra param to fetch the picture type from qsv decoder The judgement “key frame is equal to IDR frame” only suitable for H264. For HEVC, all IRAP frames are key frames, and other codecs have no IDR frame. Signed-off-by: ChaoX A Liu Signed-off-by: Zhong Li Signed-off-by: Maxym Dmytrychenko --- libavcodec/qsv_internal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavcodec/qsv_internal.h') diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index 975c8de441..07ddc59044 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -48,6 +48,8 @@ typedef struct QSVMid { typedef struct QSVFrame { AVFrame *frame; mfxFrameSurface1 surface; + mfxExtDecodedFrameInfo dec_info; + mfxExtBuffer *ext_param; int queued; int used; @@ -83,6 +85,7 @@ int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id); int ff_qsv_profile_to_mfx(enum AVCodecID codec_id, int profile); int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc); +enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type); int ff_qsv_init_internal_session(AVCodecContext *avctx, mfxSession *session, const char *load_plugins); -- cgit v1.2.3