aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsv_internal.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-08-10 09:38:21 +0200
committerAnton Khirnov <anton@khirnov.net>2016-11-07 12:48:00 +0100
commit4ab61cd983b539749bd621ea271624ddb5196a8e (patch)
tree6b5013b990f8a170d82819c8c012b90d29cb4c94 /libavcodec/qsv_internal.h
parent00aeedd84105a17f414185bd33ecadebeddb3a27 (diff)
downloadffmpeg-4ab61cd983b539749bd621ea271624ddb5196a8e.tar.gz
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 <maxym.dmytrychenko@intel.com>
Diffstat (limited to 'libavcodec/qsv_internal.h')
-rw-r--r--libavcodec/qsv_internal.h13
1 files changed, 12 insertions, 1 deletions
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;