diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2022-01-24 16:24:53 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2022-01-29 12:02:52 +0800 |
commit | 8dd507bf0daa826691ea5960ed5634233518c57c (patch) | |
tree | 232be29bb0228e6bf0c94c8078925fa219a73205 /libavcodec/qsv_internal.h | |
parent | 80801e570566976195f515216de4403cdcf4f7a3 (diff) | |
download | ffmpeg-8dd507bf0daa826691ea5960ed5634233518c57c.tar.gz |
lavc/qsv: allow to add more parameter buffers to QSV frame
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Diffstat (limited to 'libavcodec/qsv_internal.h')
-rw-r--r-- | libavcodec/qsv_internal.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index fe9d5319c4..6a38e87d23 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -52,6 +52,8 @@ #define QSV_MAX_ENC_PAYLOAD 2 // # of mfxEncodeCtrl payloads supported +#define QSV_MAX_FRAME_EXT_PARAMS 4 + #define QSV_VERSION_ATLEAST(MAJOR, MINOR) \ (MFX_VERSION_MAJOR > (MAJOR) || \ MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR)) @@ -74,7 +76,8 @@ typedef struct QSVFrame { mfxFrameSurface1 surface; mfxEncodeCtrl enc_ctrl; mfxExtDecodedFrameInfo dec_info; - mfxExtBuffer *ext_param; + mfxExtBuffer *ext_param[QSV_MAX_FRAME_EXT_PARAMS]; + int num_ext_params; mfxPayload *payloads[QSV_MAX_ENC_PAYLOAD]; ///< used for enc_ctrl.Payload @@ -138,4 +141,7 @@ int ff_qsv_init_session_frames(AVCodecContext *avctx, mfxSession *session, int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame); +void ff_qsv_frame_add_ext_param(AVCodecContext *avctx, QSVFrame *frame, + mfxExtBuffer *param); + #endif /* AVCODEC_QSV_INTERNAL_H */ |