aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvenc.h
diff options
context:
space:
mode:
authorMaxym Dmytrychenko <maxim.d33@gmail.com>2018-04-02 15:17:23 +0200
committerMaxym Dmytrychenko <maxim.d33@gmail.com>2018-04-08 20:47:59 +0200
commitcca5e4f040971db6de0bfe6968f00c021d8a9c42 (patch)
tree8d9dc68ef641717b1d91283f712da6dcb5947a7f /libavcodec/qsvenc.h
parent29a8ed766354c45c9be4b8512c5b2eb25a450cdc (diff)
downloadffmpeg-cca5e4f040971db6de0bfe6968f00c021d8a9c42.tar.gz
qsv: adding Multi Frame Encode support
Starting from API 1.25 helps to improve performance of the simultaneous encode, 1:N scenario, like: ./avconv -y -hwaccel qsv -c:v h264_qsv -r 30000/1001 -i ~/bbb_sunflower_1080p_60fps_normal.mp4 -vframes 600 -an \ -filter_complex "split=2[s1][s2]; [s1]scale_qsv=1280:720[o1]; [s2]scale_qsv=960:540[o2]" \ -map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f rawvideo /tmp/3200a.264 \ -map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f rawvideo /tmp/1750a.264 Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
Diffstat (limited to 'libavcodec/qsvenc.h')
-rw-r--r--libavcodec/qsvenc.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index ab55795950..a7fc57bb48 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -50,11 +50,13 @@
#define QSV_HAVE_ICQ QSV_VERSION_ATLEAST(1, 8)
#define QSV_HAVE_VCM QSV_VERSION_ATLEAST(1, 8)
#define QSV_HAVE_QVBR QSV_VERSION_ATLEAST(1, 11)
+#define QSV_HAVE_MF 0
#else
#define QSV_HAVE_AVBR 0
#define QSV_HAVE_ICQ 0
#define QSV_HAVE_VCM 0
#define QSV_HAVE_QVBR 0
+#define QSV_HAVE_MF QSV_VERSION_ATLEAST(1, 25)
#endif
#if !QSV_HAVE_LA_DS
@@ -109,12 +111,15 @@ typedef struct QSVEncContext {
#if QSV_HAVE_CO2
mfxExtCodingOption2 extco2;
#endif
-
+#if QSV_HAVE_MF
+ mfxExtMultiFrameParam extmfp;
+ mfxExtMultiFrameControl extmfc;
+#endif
mfxExtOpaqueSurfaceAlloc opaque_alloc;
mfxFrameSurface1 **opaque_surfaces;
AVBufferRef *opaque_alloc_buf;
- mfxExtBuffer *extparam_internal[2 + QSV_HAVE_CO2];
+ mfxExtBuffer *extparam_internal[2 + QSV_HAVE_CO2 + (QSV_HAVE_MF * 2)];
int nb_extparam_internal;
mfxExtBuffer **extparam;
@@ -156,6 +161,9 @@ typedef struct QSVEncContext {
int int_ref_qp_delta;
int recovery_point_sei;
+#if QSV_HAVE_MF
+ int mfmode;
+#endif
char *load_plugins;
} QSVEncContext;