summaryrefslogtreecommitdiff
path: root/libavcodec/qsv_internal.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-08-10 08:29:23 +0200
committerAnton Khirnov <anton@khirnov.net>2016-11-07 12:47:54 +0100
commit00aeedd84105a17f414185bd33ecadebeddb3a27 (patch)
tree6b65d33f3ad9b28e89198e67cab5edf85cd16e17 /libavcodec/qsv_internal.h
parent404e51478ecad060249d5b9bee6ab39a8a9d8c1c (diff)
qsv{dec,enc}: use a struct as a memory id with internal memory allocator
This will allow implementing the allocator more fully, which is needed by the HEVC encoder plugin with video memory input. Signed-off-by: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
Diffstat (limited to 'libavcodec/qsv_internal.h')
-rw-r--r--libavcodec/qsv_internal.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h
index 5b015a619d..8b69891aa6 100644
--- a/libavcodec/qsv_internal.h
+++ b/libavcodec/qsv_internal.h
@@ -36,6 +36,10 @@
(MFX_VERSION_MAJOR > (MAJOR) || \
MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR))
+typedef struct QSVMid {
+ mfxHDL handle;
+} QSVMid;
+
typedef struct QSVFrame {
AVFrame *frame;
mfxFrameSurface1 surface;
@@ -49,8 +53,8 @@ typedef struct QSVFrame {
typedef struct QSVFramesContext {
AVBufferRef *hw_frames_ctx;
mfxFrameInfo info;
- mfxMemId *mids;
- int nb_mids;
+ QSVMid *mids;
+ int nb_mids;
} QSVFramesContext;
/**
@@ -75,4 +79,6 @@ int ff_qsv_init_session_hwcontext(AVCodecContext *avctx, mfxSession *session,
QSVFramesContext *qsv_frames_ctx,
const char *load_plugins, int opaque);
+int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame);
+
#endif /* AVCODEC_QSV_INTERNAL_H */