aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvenc.h
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang-at-intel.com@ffmpeg.org>2022-05-22 20:19:11 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2022-05-25 15:17:35 +0800
commit478e1a98a289bbc777bddc02fdcefeaa3c416a63 (patch)
tree40af1f70c38fa3a39821c6daa334d94aa8c6b9fd /libavcodec/qsvenc.h
parentf8a07c4d4abbd3974e074bc54bc22eeaa0f46051 (diff)
downloadffmpeg-478e1a98a289bbc777bddc02fdcefeaa3c416a63.tar.gz
qsv: add requirement for the mininal version of libmfx
libmfx 1.28 was released 3 years ago, it is easy to get a greater version than 1.28. We may remove lots of compile-time checks if adding the requirement for the minimal version in the configure script. Reviewed-by: softworkz <softworkz@hotmail.com> Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Diffstat (limited to 'libavcodec/qsvenc.h')
-rw-r--r--libavcodec/qsvenc.h51
1 files changed, 9 insertions, 42 deletions
diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index 33bbc2a1d6..fec5e584db 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -35,46 +35,16 @@
#include "hwconfig.h"
#include "qsv_internal.h"
-#define QSV_HAVE_CO2 QSV_VERSION_ATLEAST(1, 6)
-#define QSV_HAVE_CO3 QSV_VERSION_ATLEAST(1, 11)
-#define QSV_HAVE_CO_VPS QSV_VERSION_ATLEAST(1, 17)
-
-#define QSV_HAVE_EXT_HEVC_TILES QSV_VERSION_ATLEAST(1, 13)
-#define QSV_HAVE_EXT_VP9_PARAM QSV_VERSION_ATLEAST(1, 26)
#define QSV_HAVE_EXT_VP9_TILES QSV_VERSION_ATLEAST(1, 29)
-#define QSV_HAVE_TRELLIS QSV_VERSION_ATLEAST(1, 8)
-#define QSV_HAVE_MAX_SLICE_SIZE QSV_VERSION_ATLEAST(1, 9)
-#define QSV_HAVE_DISABLEDEBLOCKIDC QSV_VERSION_ATLEAST(1, 9)
-#define QSV_HAVE_BREF_TYPE QSV_VERSION_ATLEAST(1, 8)
-
-#define QSV_HAVE_LA QSV_VERSION_ATLEAST(1, 7)
-#define QSV_HAVE_LA_DS QSV_VERSION_ATLEAST(1, 8)
-#define QSV_HAVE_LA_HRD QSV_VERSION_ATLEAST(1, 11)
-#define QSV_HAVE_VDENC QSV_VERSION_ATLEAST(1, 15)
-#define QSV_HAVE_PREF QSV_VERSION_ATLEAST(1, 16)
-
-#define QSV_HAVE_GPB QSV_VERSION_ATLEAST(1, 18)
-
#if defined(_WIN32) || defined(__CYGWIN__)
-#define QSV_HAVE_AVBR QSV_VERSION_ATLEAST(1, 3)
-#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_AVBR 1
+#define QSV_HAVE_VCM 1
#define QSV_HAVE_MF 0
#else
#define QSV_HAVE_AVBR 0
-#define QSV_HAVE_ICQ QSV_VERSION_ATLEAST(1, 28)
#define QSV_HAVE_VCM 0
-#define QSV_HAVE_QVBR QSV_VERSION_ATLEAST(1, 28)
-#define QSV_HAVE_MF QSV_VERSION_ATLEAST(1, 25)
-#endif
-
-#if !QSV_HAVE_LA_DS
-#define MFX_LOOKAHEAD_DS_UNKNOWN 0
-#define MFX_LOOKAHEAD_DS_OFF 0
-#define MFX_LOOKAHEAD_DS_2x 0
-#define MFX_LOOKAHEAD_DS_4x 0
+#define QSV_HAVE_MF 1
#endif
#define QSV_COMMON_OPTS \
@@ -150,22 +120,14 @@ typedef struct QSVEncContext {
mfxFrameAllocRequest req;
mfxExtCodingOption extco;
-#if QSV_HAVE_CO2
mfxExtCodingOption2 extco2;
-#endif
-#if QSV_HAVE_CO3
mfxExtCodingOption3 extco3;
-#endif
#if QSV_HAVE_MF
mfxExtMultiFrameParam extmfp;
mfxExtMultiFrameControl extmfc;
#endif
-#if QSV_HAVE_EXT_HEVC_TILES
mfxExtHEVCTiles exthevctiles;
-#endif
-#if QSV_HAVE_EXT_VP9_PARAM
mfxExtVP9Param extvp9param;
-#endif
mfxExtOpaqueSurfaceAlloc opaque_alloc;
mfxFrameSurface1 **opaque_surfaces;
@@ -173,7 +135,7 @@ typedef struct QSVEncContext {
mfxExtVideoSignalInfo extvsi;
- mfxExtBuffer *extparam_internal[3 + QSV_HAVE_CO2 + QSV_HAVE_CO3 + (QSV_HAVE_MF * 2)];
+ mfxExtBuffer *extparam_internal[5 + (QSV_HAVE_MF * 2)];
int nb_extparam_internal;
mfxExtBuffer **extparam;
@@ -242,6 +204,11 @@ typedef struct QSVEncContext {
SetEncodeCtrlCB *set_encode_ctrl_cb;
int forced_idr;
int low_delay_brc;
+
+ int co2_idx;
+ int co3_idx;
+ int exthevctiles_idx;
+ int vp9_idx;
} QSVEncContext;
int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q);