Skip to content

Commit

Permalink
OneVPL v2.9 (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
tletnes authored Mar 31, 2023
1 parent bb20434 commit 97aeffd
Show file tree
Hide file tree
Showing 24 changed files with 838 additions and 138 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.2-rev-1",
"vpl_version": "2.8.0",
"vpl_version": "2.9.0",
"art_version": "1.0-rev-1"
}
18 changes: 15 additions & 3 deletions source/elements/oneVPL/include/vpl/mfxadapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ extern "C"
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.
@deprecated Deprecated in API version 2.9. Use MFXEnumImplementations and MFXSetConfigFilterProperty to query adapter capabilities and
to select a suitable adapter for the input workload.
Use MFX_DEPRECATED_OFF macro to turn off the deprecation message visualization.
*/
mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersInfo* adapters);
MFX_DEPRECATED mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersInfo* adapters);

/*!
@brief
Expand All @@ -49,8 +53,12 @@ mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersIn
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.
@deprecated Deprecated in API version 2.9. Use MFXEnumImplementations and MFXSetConfigFilterProperty to query adapter capabilities and
to select a suitable adapter for the input workload.
Use MFX_DEPRECATED_OFF macro to turn off the deprecation message visualization.
*/
mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec_id, mfxAdaptersInfo* adapters);
MFX_DEPRECATED mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec_id, mfxAdaptersInfo* adapters);

/*!
@brief
Expand All @@ -63,8 +71,12 @@ mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec
MFX_ERR_NULL_PTR num_adapters pointer is NULL.
@since This function is available since API version 1.31.
@deprecated Deprecated in API version 2.9. Use MFXEnumImplementations and MFXSetConfigFilterProperty to query adapter capabilities and
to select a suitable adapter for the input workload.
Use MFX_DEPRECATED_OFF macro to turn off the deprecation message visualization.
*/
mfxStatus MFX_CDECL MFXQueryAdaptersNumber(mfxU32* num_adapters);
MFX_DEPRECATED mfxStatus MFX_CDECL MFXQueryAdaptersNumber(mfxU32* num_adapters);
#ifdef __cplusplus
} // extern "C"
#endif
Expand Down
76 changes: 45 additions & 31 deletions source/elements/oneVPL/include/vpl/mfxcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,35 +237,34 @@ typedef struct {
} mfxExtThreadsParam;
MFX_PACK_END()

/*! The PlatformCodeName enumerator itemizes product code names for platforms.
For details about Intel code names, see ark.intel.com. */
/*! Deprecated. */
enum {
MFX_PLATFORM_UNKNOWN = 0, /*!< Unknown platform. */
MFX_PLATFORM_SANDYBRIDGE = 1, /*!< Intel(r) microarchitecture code name Sandy Bridge. */
MFX_PLATFORM_IVYBRIDGE = 2, /*!< Intel(r) microarchitecture code name Ivy Bridge. */
MFX_PLATFORM_HASWELL = 3, /*!< Code name Haswell. */
MFX_PLATFORM_BAYTRAIL = 4, /*!< Code name Bay Trail. */
MFX_PLATFORM_BROADWELL = 5, /*!< Intel(r) microarchitecture code name Broadwell. */
MFX_PLATFORM_CHERRYTRAIL = 6, /*!< Code name Cherry Trail. */
MFX_PLATFORM_SKYLAKE = 7, /*!< Intel(r) microarchitecture code name Skylake. */
MFX_PLATFORM_APOLLOLAKE = 8, /*!< Code name Apollo Lake. */
MFX_PLATFORM_KABYLAKE = 9, /*!< Code name Kaby Lake. */
MFX_PLATFORM_GEMINILAKE = 10, /*!< Code name Gemini Lake. */
MFX_PLATFORM_COFFEELAKE = 11, /*!< Code name Coffee Lake. */
MFX_PLATFORM_CANNONLAKE = 20, /*!< Code name Cannon Lake. */
MFX_PLATFORM_ICELAKE = 30, /*!< Code name Ice Lake. */
MFX_PLATFORM_JASPERLAKE = 32, /*!< Code name Jasper Lake. */
MFX_PLATFORM_ELKHARTLAKE = 33, /*!< Code name Elkhart Lake. */
MFX_PLATFORM_TIGERLAKE = 40, /*!< Code name Tiger Lake. */
MFX_PLATFORM_ROCKETLAKE = 42, /*!< Code name Rocket Lake. */
MFX_PLATFORM_ALDERLAKE_S = 43, /*!< Code name Alder Lake S. */
MFX_PLATFORM_ALDERLAKE_P = 44, /*!< Code name Alder Lake P. */
MFX_PLATFORM_ARCTICSOUND_P = 45,
MFX_PLATFORM_XEHP_SDV = 45, /*!< Code name XeHP SDV. */
MFX_PLATFORM_DG2 = 46, /*!< Code name DG2. */
MFX_PLATFORM_ATS_M = 46, /*!< Code name ATS-M, same media functionality as DG2. */
MFX_PLATFORM_ALDERLAKE_N = 55, /*!< Code name Alder Lake N. */
MFX_PLATFORM_KEEMBAY = 50, /*!< Code name Keem Bay. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_UNKNOWN) = 0, /*!< Unknown platform. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_SANDYBRIDGE) = 1, /*!< Intel(r) microarchitecture code name Sandy Bridge. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_IVYBRIDGE) = 2, /*!< Intel(r) microarchitecture code name Ivy Bridge. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_HASWELL) = 3, /*!< Code name Haswell. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_BAYTRAIL) = 4, /*!< Code name Bay Trail. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_BROADWELL) = 5, /*!< Intel(r) microarchitecture code name Broadwell. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_CHERRYTRAIL) = 6, /*!< Code name Cherry Trail. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_SKYLAKE) = 7, /*!< Intel(r) microarchitecture code name Skylake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_APOLLOLAKE) = 8, /*!< Code name Apollo Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_KABYLAKE) = 9, /*!< Code name Kaby Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_GEMINILAKE) = 10, /*!< Code name Gemini Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_COFFEELAKE) = 11, /*!< Code name Coffee Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_CANNONLAKE) = 20, /*!< Code name Cannon Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_ICELAKE) = 30, /*!< Code name Ice Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_JASPERLAKE) = 32, /*!< Code name Jasper Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_ELKHARTLAKE) = 33, /*!< Code name Elkhart Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_TIGERLAKE) = 40, /*!< Code name Tiger Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_ROCKETLAKE) = 42, /*!< Code name Rocket Lake. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_ALDERLAKE_S) = 43, /*!< Code name Alder Lake S. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_ALDERLAKE_P) = 44, /*!< Code name Alder Lake P. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_ARCTICSOUND_P) = 45,
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_XEHP_SDV) = 45, /*!< Code name XeHP SDV. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_DG2) = 46, /*!< Code name DG2. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_ATS_M) = 46, /*!< Code name ATS-M, same media functionality as DG2. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_ALDERLAKE_N) = 55, /*!< Code name Alder Lake N. */
MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLATFORM_KEEMBAY) = 50, /*!< Code name Keem Bay. */
};

/*! The mfxMediaAdapterType enumerator itemizes types of graphics adapters. */
Expand All @@ -279,7 +278,7 @@ typedef enum
MFX_PACK_BEGIN_USUAL_STRUCT()
/*! Contains information about hardware platform for the Legacy mode. */
typedef struct {
mfxU16 CodeName; /*!< Microarchitecture code name. See the PlatformCodeName enumerator for a list of possible values. */
MFX_DEPRECATED mfxU16 CodeName; /*!< Deprecated. */
mfxU16 DeviceId; /*!< Unique identifier of graphics device. */
mfxU16 MediaAdapterType; /*!< Description of graphics adapter type. See the mfxMediaAdapterType enumerator for a list of possible values. */
mfxU16 reserved[13]; /*!< Reserved for future use. */
Expand Down Expand Up @@ -559,11 +558,27 @@ typedef struct {
mfxU32 DRMPrimaryNodeNum; /*!< Number of the DRM primary node from the path /dev/dri/card\<num\>.
Value equals to 0x7FFFFFFF means that this field doesn't contain valid DRM Primary
Node number.*/
mfxU8 reserved1[20]; /*!< Reserved for future use. */
mfxU16 RevisionID; /*!< PCI revision ID. The value contains microarchitecture version. */
mfxU8 reserved1[18]; /*!< Reserved for future use. */
mfxChar DeviceName[MFX_STRFIELD_LEN]; /*!< Null-terminated string in utf-8 with the name of the device. */
} mfxExtendedDeviceId;
MFX_PACK_END()

MFX_PACK_BEGIN_USUAL_STRUCT()
/*! Cross domain structure to define device UUID. It is defined here to check backward compatibility.*/
typedef struct {
mfxU16 vendor_id; /*!< PCI vendor ID. Same as mfxExtendedDeviceId::VendorID. */
mfxU16 device_id; /*!< PCI device ID. Same as mfxExtendedDeviceId::DeviceID. */
mfxU16 revision_id; /*!< PCI revision ID. Same as mfxExtendedDeviceId::RevisionID. */
mfxU16 pci_domain; /*!< PCI bus domain. Same as mfxExtendedDeviceId::PCIDomain. */
mfxU8 pci_bus; /*!< The number of the bus that the physical device is located on. Same as mfxExtendedDeviceId::PCIBus. */
mfxU8 pci_dev; /*!< The index of the physical device on the bus. Same as mfxExtendedDeviceId::PCIDevice. */
mfxU8 pci_func; /*!< The function number of the device on the physical device. Same as mfxExtendedDeviceId::PCIFunction. */
mfxU8 reserved[4]; /*!< Reserved for future use. */
mfxU8 sub_device_id; /*!< SubDevice ID.*/
} extDeviceUUID;
MFX_PACK_END()

#endif

/* The mfxImplCapsDeliveryFormat enumerator specifies delivery format of the implementation capability. */
Expand Down Expand Up @@ -608,4 +623,3 @@ MFX_PACK_END()
#endif /* __cplusplus */

#endif

2 changes: 1 addition & 1 deletion source/elements/oneVPL/include/vpl/mfxdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define __MFXDEFS_H__

#define MFX_VERSION_MAJOR 2
#define MFX_VERSION_MINOR 8
#define MFX_VERSION_MINOR 9

// 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
Expand Down
32 changes: 30 additions & 2 deletions source/elements/oneVPL/include/vpl/mfxdispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ mfxStatus MFX_CDECL MFXSetConfigFilterProperty(mfxConfig config, const mfxU8* na

/*!
@brief Iterates over filtered out implementations to gather their details. This function allocates memory to store
mfxImplDescription structure instance. Use the MFXDispReleaseImplDescription function to free memory allocated to the mfxImplDescription structure.
a structure or string corresponding to the type specified by format. For example, if format is set to
MFX_IMPLCAPS_IMPLDESCSTRUCTURE, then idesc will return a pointer to a structure of type mfxImplDescription.
Use the MFXDispReleaseImplDescription function to free memory allocated to this structure or string.
@param[in] loader Loader handle.
@param[in] i Index of the implementation.
@param[in] format Format in which capabilities need to be delivered. See the mfxImplCapsDeliveryFormat enumerator for more details.
@param[out] idesc Pointer to the mfxImplDescription structure.
@param[out] idesc Pointer to the structure or string corresponding to the requested format.
@return
MFX_ERR_NONE The function completed successfully. The idesc contains valid information.\n
MFX_ERR_NULL_PTR If loader is NULL. \n
Expand Down Expand Up @@ -147,6 +149,32 @@ mfxStatus MFX_CDECL MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession* ses
*/
mfxStatus MFX_CDECL MFXDispReleaseImplDescription(mfxLoader loader, mfxHDL hdl);

#ifdef ONEVPL_EXPERIMENTAL
/*!
@brief
Macro help to return UUID in the common oneAPI format.
@param[in] devinfo Handle to mfxExtendedDeviceId.
@param[in] sub_device_id SubDevice number. Can be obtained from mfxDeviceDescription::SubDevices::Index. Set to zero if no SubDevices.
@param[out] uuid Pointer to UUID.
*/
#define MFX_UUID_COMPUTE_DEVICE_ID(devinfo, sub_device_id, uuid) \
{ \
extDeviceUUID t_uuid = { 0 }; \
extDeviceUUID* shared_uuid = (extDeviceUUID*)uuid; \
t_uuid.vendor_id = devinfo->VendorID; \
t_uuid.device_id = devinfo->DeviceID; \
t_uuid.revision_id = devinfo->RevisionID; \
t_uuid.pci_domain = devinfo->PCIDomain; \
t_uuid.pci_bus = (mfxU8)devinfo->PCIBus; \
t_uuid.pci_dev = (mfxU8)devinfo->PCIDevice; \
t_uuid.pci_func = (mfxU8)devinfo->PCIFunction; \
t_uuid.sub_device_id = (mfxU8)sub_device_id; \
*shared_uuid = t_uuid; \
}
#endif

/* Helper macro definitions to add config filter properties. */

/*! Adds single property of mfxU32 type.
Expand Down
Loading

0 comments on commit 97aeffd

Please sign in to comment.