X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libavcodec%2Fqsv_internal.h;h=c2d301b4a22d51df2f1ff9f25e6cd69f3ea0cd03;hb=2b01b7918beebe7b392ebf255f887e396a59e4c6;hp=8131acdae9caa561ae818236b5232d4065c9f02a;hpb=55e5af3c03898ffbac352fe4af83208fa4129c71;p=platform%2Fupstream%2Fffmpeg.git diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index 8131acd..c2d301b 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -23,9 +23,9 @@ #include "config.h" -#if CONFIG_VAAPI +#if CONFIG_VAAPI && !defined(_WIN32) // Do not enable for libva-win32 on Windows #define AVCODEC_QSV_LINUX_SESSION_HANDLE -#endif //CONFIG_VAAPI +#endif //CONFIG_VAAPI && !defined(_WIN32) #ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE #include @@ -35,11 +35,10 @@ #endif #include #include -#include #include "libavutil/hwcontext_vaapi.h" #endif -#include +#include #include "libavutil/frame.h" @@ -51,7 +50,7 @@ #define ASYNC_DEPTH_DEFAULT 4 // internal parallelism #define QSV_MAX_ENC_PAYLOAD 2 // # of mfxEncodeCtrl payloads supported -#define QSV_MAX_ENC_EXTPARAM 2 +#define QSV_MAX_ENC_EXTPARAM 8 // # of mfxEncodeCtrl extparam supported #define QSV_MAX_ROI_NUM 256 @@ -65,6 +64,9 @@ ((MFX_VERSION.Major > (MAJOR)) || \ (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR))) +#define QSV_ONEVPL QSV_VERSION_ATLEAST(2, 0) +#define QSV_HAVE_OPAQUE !QSV_ONEVPL + typedef struct QSVMid { AVBufferRef *hw_frames_ref; mfxHDLPair *handle_pair; @@ -82,6 +84,12 @@ typedef struct QSVFrame { #if QSV_VERSION_ATLEAST(1, 34) mfxExtAV1FilmGrainParam av1_film_grain_param; #endif + +#if QSV_VERSION_ATLEAST(1, 35) + mfxExtMasteringDisplayColourVolume mdcv; + mfxExtContentLightLevelInfo clli; +#endif + mfxExtBuffer *ext_param[QSV_MAX_FRAME_EXT_PARAMS]; int num_ext_params; @@ -100,6 +108,7 @@ typedef struct QSVSession { AVBufferRef *va_device_ref; AVHWDeviceContext *va_device_ctx; #endif + void *loader; } QSVSession; typedef struct QSVFramesContext { @@ -128,7 +137,7 @@ int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id); enum AVPixelFormat ff_qsv_map_fourcc(uint32_t fourcc); -int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc); +int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc, uint16_t *shift); enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type); enum AVFieldOrder ff_qsv_map_picstruct(int mfx_pic_struct);