From 4ab61cd983b539749bd621ea271624ddb5196a8e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 10 Aug 2016 09:38:21 +0200 Subject: qsv{enc,dec}: extend the internal frame allocator Handle the internal frame requests, which is required by the HEVC encoding plugin. Signed-off-by: Maxym Dmytrychenko --- libavcodec/qsv_internal.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libavcodec/qsv_internal.h') diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index 8b69891aa6..a8f486764b 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -37,7 +37,12 @@ MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR)) typedef struct QSVMid { + AVBufferRef *hw_frames_ref; mfxHDL handle; + + AVFrame *locked_frame; + AVFrame *hw_frame; + mfxFrameSurface1 surf; } QSVMid; typedef struct QSVFrame { @@ -52,7 +57,13 @@ typedef struct QSVFrame { typedef struct QSVFramesContext { AVBufferRef *hw_frames_ctx; - mfxFrameInfo info; + void *logctx; + + /* The memory ids for the external frames. + * Refcounted, since we need one reference owned by the QSVFramesContext + * (i.e. by the encoder/decoder) and another one given to the MFX session + * from the frame allocator. */ + AVBufferRef *mids_buf; QSVMid *mids; int nb_mids; } QSVFramesContext; -- cgit v1.2.3