Skip to content

Commit

Permalink
oneVPL 2.2 API version release (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorBelyakovIntel authored Feb 18, 2021
1 parent 3fbac1b commit a575fbf
Show file tree
Hide file tree
Showing 40 changed files with 1,505 additions and 355 deletions.
2 changes: 1 addition & 1 deletion oneapi-doc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0-rev-2",
"vpl_version": "2.1.0",
"vpl_version": "2.2.0",
"art_version": "0.5-rev-1"
}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ sphinxcontrib-spelling
sphinxcontrib-svg2pdfconverter
graphviz
lxml
sphinxcontrib.plantuml
5 changes: 5 additions & 0 deletions source/conf/common_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
sys.path.insert(
0, abspath(join(repo_root, 'source', 'elements', 'oneDAL')) # noqa: F821
)
sys.path.insert(
0, abspath(join(repo_root, 'source', 'elements', 'oneVPL')) # noqa: F821
)

extensions = [
'notfound.extension',
Expand All @@ -34,7 +37,9 @@
'sphinxcontrib.inkscapeconverter',
'sphinx-prompt',
'sphinx_substitution_extensions',
'sphinxcontrib.plantuml',
'breathe',
# 'vplapi',
'dalapi', # oneDAL API generator
]

Expand Down
40 changes: 0 additions & 40 deletions source/elements/oneVPL/include/onevpl/mfxvp9.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ extern "C"
@p input_info or adapters pointer is NULL. \n
MFX_ERR_NOT_FOUND No suitable adapters found. \n
MFX_WRN_OUT_OF_RANGE Not enough memory to report back entire list of adapters. In this case as many adapters as possible will be returned.
@since This function is available since API version 1.31.
*/
mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersInfo* adapters);

Expand All @@ -45,6 +47,8 @@ mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersIn
MFX_ERR_NULL_PTR bitstream or @p adapters pointer is NULL. \n
MFX_ERR_NOT_FOUND No suitable adapters found. \n
MFX_WRN_OUT_OF_RANGE Not enough memory to report back entire list of adapters. In this case as many adapters as possible will be returned.
@since This function is available since API version 1.31.
*/
mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec_id, mfxAdaptersInfo* adapters);

Expand All @@ -57,6 +61,8 @@ mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec
@return
MFX_ERR_NONE The function completed successfully. \n
MFX_ERR_NULL_PTR num_adapters pointer is NULL.
@since This function is available since API version 1.31.
*/
mfxStatus MFX_CDECL MFXQueryAdaptersNumber(mfxU32* num_adapters);
#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ enum {
MFX_BRC_PANIC_SMALL_FRAME = 4 /*!< Coded frame is too small, no further recoding possible - required padding to mfxBRCFrameStatus::MinFrameSize. */
};

MFX_PACK_BEGIN_USUAL_STRUCT()
MFX_PACK_BEGIN_STRUCT_W_PTR()
/*!
Specifies instructions for the encoder provided by external BRC after each frame encoding. See the BRCStatus enumerator for details.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,13 @@ enum {
MFX_IMPL_HARDWARE4 = 0x0007, /*!< Hardware accelerated implementation (4th device). */
MFX_IMPL_RUNTIME = 0x0008, /*!< This value cannot be used for session initialization. It may be returned by the MFXQueryIMPL
function to show that the session has been initialized in run-time mode. */
#if (MFX_VERSION >= MFX_VERSION_NEXT)
MFX_IMPL_SINGLE_THREAD= 0x0009,
#endif
MFX_IMPL_VIA_ANY = 0x0100, /*!< Hardware acceleration can go through any supported OS infrastructure. This is the default value. The default value
is used by the legacy Intel(r) Media SDK if none of the MFX_IMPL_VIA_xxx flags are specified by the application. */
MFX_IMPL_VIA_D3D9 = 0x0200, /*!< Hardware acceleration goes through the Microsoft* Direct3D* 9 infrastructure. */
MFX_IMPL_VIA_D3D11 = 0x0300, /*!< Hardware acceleration goes through the Microsoft* Direct3D* 11 infrastructure. */
MFX_IMPL_VIA_VAAPI = 0x0400, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure. */
MFX_IMPL_VIA_HDDLUNITE = 0x0500, /*!< Hardware acceleration goes through the HDDL* Unite*. */

#if (MFX_VERSION >= MFX_VERSION_NEXT)
MFX_IMPL_EXTERNAL_THREADING = 0x10000,
#endif

MFX_IMPL_UNSUPPORTED = 0x0000 /*!< One of the MFXQueryIMPL returns. */
};

Expand Down Expand Up @@ -368,9 +361,16 @@ typedef enum {
MFX_ACCEL_MODE_VIA_D3D9 = 0x0200, /*!< Hardware acceleration goes through the Microsoft* Direct3D9* infrastructure. */
MFX_ACCEL_MODE_VIA_D3D11 = 0x0300, /*!< Hardware acceleration goes through the Microsoft* Direct3D11* infrastructure. */
MFX_ACCEL_MODE_VIA_VAAPI = 0x0400, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure. */
MFX_ACCEL_MODE_VIA_VAAPI_DRM_RENDER_NODE = MFX_ACCEL_MODE_VIA_VAAPI, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure with DRM RENDER MODE as default acceleration access point. */
MFX_ACCEL_MODE_VIA_VAAPI_DRM_MODESET = 0x0401, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure with DRM MODESET as default acceleration access point. */
MFX_ACCEL_MODE_VIA_VAAPI_GLX = 0x0402, /*! Hardware acceleration goes through the Linux* VA-API infrastructure with OpenGL Extension to the X Window System
as default acceleration access point. */
MFX_ACCEL_MODE_VIA_VAAPI_X11 = 0x0403, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure with X11 as default acceleration access point. */
MFX_ACCEL_MODE_VIA_VAAPI_WAYLAND = 0x0404, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure with Wayland as default acceleration access point. */
MFX_ACCEL_MODE_VIA_HDDLUNITE = 0x0500, /*!< Hardware acceleration goes through the HDDL* Unite*. */
} mfxAccelerationMode;


#define MFX_ACCELERATIONMODESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 0)

MFX_PACK_BEGIN_STRUCT_W_PTR()
Expand All @@ -393,7 +393,7 @@ typedef struct {
mfxAccelerationMode AccelerationMode; /*!< Default Hardware acceleration stack to use. OS dependent parameter. Use VA for Linux* and DX* for Windows*. */
mfxVersion ApiVersion; /*!< Supported API version. */
mfxChar ImplName[MFX_IMPL_NAME_LEN]; /*!< Null-terminated string with implementation name given by vendor. */
mfxChar License[MFX_STRFIELD_LEN]; /*!< Null-terminated string with license name of the implementation. */
mfxChar License[MFX_STRFIELD_LEN]; /*!< Null-terminated string with comma-separated list of license names of the implementation. */
mfxChar Keywords[MFX_STRFIELD_LEN]; /*!< Null-terminated string with comma-separated list of keywords specific to this implementation that dispatcher can search for. */
mfxU32 VendorID; /*!< Standard vendor ID 0x8086 - Intel. */
mfxU32 VendorImplID; /*!< Vendor specific number with given implementation ID. */
Expand All @@ -415,9 +415,19 @@ typedef struct {
} mfxImplDescription;
MFX_PACK_END()

MFX_PACK_BEGIN_STRUCT_W_PTR()
/*! This structure represents the list of names of implemented functions. */
typedef struct {
mfxU16 NumFunctions; /*!< Number of function names in the FunctionsName array. */
mfxChar** FunctionsName; /*!< Array of the null-terminated strings. Each string contains name of the implemented function. */
} mfxImplementedFunctions;
MFX_PACK_END()


/* The mfxImplCapsDeliveryFormat enumerator specifies delivery format of the implementation capability. */
typedef enum {
MFX_IMPLCAPS_IMPLDESCSTRUCTURE = 1 /*!< Deliver capabilities as mfxImplDescription structure. */
MFX_IMPLCAPS_IMPLDESCSTRUCTURE = 1, /*!< Deliver capabilities as mfxImplDescription structure. */
MFX_IMPLCAPS_IMPLEMENTEDFUNCTIONS = 2 /*!< Deliver capabilities as mfxImplementedFunctions structure. */
} mfxImplCapsDeliveryFormat;

MFX_PACK_BEGIN_STRUCT_W_PTR()
Expand All @@ -428,7 +438,8 @@ typedef struct {
mfxU16 reserved[3]; /*!< Reserved for future use. */
mfxU16 NumExtParam; /*!< The number of extra configuration structures attached to this structure. */
mfxExtBuffer **ExtParam; /*!< Points to an array of pointers to the extra configuration structures; see the ExtendedBufferID enumerator for a list of extended configurations. */
mfxU32 reserved2[4]; /*!< Reserved for future use. */
mfxU32 VendorImplID; /*!< Vendor specific number with given implementation ID. Represents the same filed from mfxImplDescription. */
mfxU32 reserved2[3]; /*!< Reserved for future use. */
} mfxInitializationParam;
MFX_PACK_END()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,18 @@
#define __MFXDEFS_H__

#define MFX_VERSION_MAJOR 2
#define MFX_VERSION_MINOR 1

// MFX_VERSION_NEXT is always +1 from last public release
// may be enforced by MFX_VERSION_USE_LATEST define
// if MFX_VERSION_USE_LATEST is defined MFX_VERSION is ignored

#define MFX_VERSION_NEXT (MFX_VERSION_MAJOR * 1000 + MFX_VERSION_MINOR + 1)
#define MFX_VERSION_MINOR 2

// MFX_VERSION - version of API that 'assumed' by build may be provided externally
// if it omitted then latest stable API derived from Major.Minor is assumed


#if !defined(MFX_VERSION)
#if defined(MFX_VERSION_USE_LATEST)
#define MFX_VERSION MFX_VERSION_NEXT
#else
#define MFX_VERSION (MFX_VERSION_MAJOR * 1000 + MFX_VERSION_MINOR)
#endif
#else
#undef MFX_VERSION_MAJOR
#define MFX_VERSION_MAJOR ((MFX_VERSION) / 1000)

#undef MFX_VERSION_MINOR
#define MFX_VERSION_MINOR ((MFX_VERSION) % 1000)
#endif
Expand Down Expand Up @@ -82,9 +75,6 @@ extern "C"
#error Unknown packing
#endif

#define __INT64 long long
#define __UINT64 unsigned long long

#ifdef _WIN32
#define MFX_CDECL __cdecl
#define MFX_STDCALL __stdcall
Expand All @@ -110,8 +100,8 @@ typedef int mfxL32; /*!< Signed integer, 32 bit type. */
#endif
typedef float mfxF32; /*!< Single-precision floating point, 32 bit type. */
typedef double mfxF64; /*!< Double-precision floating point, 64 bit type. */
typedef __UINT64 mfxU64; /*!< Unsigned integer, 64 bit type. */
typedef __INT64 mfxI64; /*!< Signed integer, 64 bit type. */
typedef unsigned long long mfxU64; /*!< Unsigned integer, 64 bit type. */
typedef long long mfxI64; /*!< Signed integer, 64 bit type. */
typedef void* mfxHDL; /*!< Handle type. */
typedef mfxHDL mfxMemId; /*!< Memory ID type. */
typedef void* mfxThreadTask; /*!< Thread task type. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ typedef struct _mfxConfig *mfxConfig;
/*!
@brief Creates the loader.
@return Loader Loader handle or NULL if failed.
@since This function is available since API version 2.0.
*/
mfxLoader MFX_CDECL MFXLoad();

/*!
@brief Destroys the dispatcher.
@param[in] loader Loader handle.
@since This function is available since API version 2.0.
*/
void MFX_CDECL MFXUnload(mfxLoader loader);

Expand All @@ -50,6 +54,8 @@ void MFX_CDECL MFXUnload(mfxLoader loader);
@endcode
@param[in] loader Loader handle.
@return Config handle or NULL pointer is failed.
@since This function is available since API version 2.0.
*/
mfxConfig MFX_CDECL MFXCreateConfig(mfxLoader loader);

Expand Down Expand Up @@ -128,6 +134,8 @@ mfxConfig MFX_CDECL MFXCreateConfig(mfxLoader loader);
MFX_ERR_NULL_PTR If name is NULL. \n
MFX_ERR_NOT_FOUND If name contains unknown parameter name.
MFX_ERR_UNSUPPORTED If value data type does not equal the parameter with provided name.
@since This function is available since API version 2.0.
*/
mfxStatus MFX_CDECL MFXSetConfigFilterProperty(mfxConfig config, const mfxU8* name, mfxVariant value);

Expand All @@ -144,6 +152,8 @@ mfxStatus MFX_CDECL MFXSetConfigFilterProperty(mfxConfig config, const mfxU8* na
MFX_ERR_NULL_PTR If idesc is NULL. \n
MFX_ERR_NOT_FOUND Provided index is out of possible range. \n
MFX_ERR_UNSUPPORTED If requested format is not supported.
@since This function is available since API version 2.0.
*/
mfxStatus MFX_CDECL MFXEnumImplementations(mfxLoader loader, mfxU32 i, mfxImplCapsDeliveryFormat format, mfxHDL* idesc);

Expand Down Expand Up @@ -176,6 +186,8 @@ mfxStatus MFX_CDECL MFXEnumImplementations(mfxLoader loader, mfxU32 i, mfxImplCa
MFX_ERR_NULL_PTR If loader is NULL. \n
MFX_ERR_NULL_PTR If session is NULL. \n
MFX_ERR_NOT_FOUND Provided index is out of possible range.
@since This function is available since API version 2.0.
*/
mfxStatus MFX_CDECL MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession* session);

Expand All @@ -190,6 +202,8 @@ mfxStatus MFX_CDECL MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession* ses
MFX_ERR_NONE The function completed successfully. \n
MFX_ERR_NULL_PTR If loader is NULL. \n
MFX_ERR_INVALID_HANDLE Provided hdl handle is not associated with this loader.
@since This function is available since API version 2.0.
*/
mfxStatus MFX_CDECL MFXDispReleaseImplDescription(mfxLoader loader, mfxHDL hdl);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
#define MFXVideoDECODE_VPP_DecodeFrameAsync disp_MFXVideoDECODE_VPP_DecodeFrameAsync
#define MFXVideoDECODE_VPP_Reset disp_MFXVideoDECODE_VPP_Reset
#define MFXVideoDECODE_VPP_GetChannelParam disp_MFXVideoDECODE_VPP_GetChannelParam
#define MFXVideoDECODE_VPP_Close disp_MFXVideoDECODE_VPP_Close

#define MFXVideoVPP_ProcessFrameAsync disp_MFXVideoVPP_ProcessFrameAsync

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ extern "C"
@return
Array of handles to the capability report or NULL in case of unsupported format or NULL num_impls pointer.
Length of array is equal to num_impls.
@since This function is available since API version 2.0.
*/
mfxHDL* MFX_CDECL MFXQueryImplsDescription(mfxImplCapsDeliveryFormat format, mfxU32* num_impls);

Expand All @@ -39,6 +41,8 @@ mfxHDL* MFX_CDECL MFXQueryImplsDescription(mfxImplCapsDeliveryFormat format, mfx
@return
MFX_ERR_NONE The function completed successfully.
@since This function is available since API version 2.0.
*/
mfxStatus MFX_CDECL MFXReleaseImplDescription(mfxHDL hdl);

Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit a575fbf

Please sign in to comment.