diff --git a/oneapi-doc.json b/oneapi-doc.json index 650b9c0309..f1e32ca9da 100644 --- a/oneapi-doc.json +++ b/oneapi-doc.json @@ -1,5 +1,5 @@ { "version": "1.2-provisional-rev-1", - "vpl_version": "2.7.1", + "vpl_version": "2.8.0", "art_version": "1.0-rev-1" } diff --git a/source/elements/oneVPL/include/vpl/mfx.h b/source/elements/oneVPL/include/vpl/mfx.h index 15994ea185..8d1785c9bc 100644 --- a/source/elements/oneVPL/include/vpl/mfx.h +++ b/source/elements/oneVPL/include/vpl/mfx.h @@ -22,8 +22,7 @@ #include "mfxvp8.h" #include "mfxjpeg.h" -#include "mfxsurfacepool.h" - +#include "mfxsurfacepool.h" #ifdef ONEVPL_EXPERIMENTAL #include "mfxencodestats.h" diff --git a/source/elements/oneVPL/include/vpl/mfxbrc.h b/source/elements/oneVPL/include/vpl/mfxbrc.h index bd876c3870..109dcbdd93 100644 --- a/source/elements/oneVPL/include/vpl/mfxbrc.h +++ b/source/elements/oneVPL/include/vpl/mfxbrc.h @@ -53,15 +53,15 @@ typedef struct { initial_cpb_removal_delay==0 && initial_cpb_removal_offset == 0 && HRD control is switched on. */ mfxU32 reserved1[7]; mfxU32 MaxFrameSize; /*!< Max frame size in bytes. Option for repack feature. Driver calls PAK until current frame size is - less than or equal to maxFrameSize, or number of repacking for this frame is equal to maxNumRePak. Repack is available - if there is driver support, MaxFrameSize !=0, and MaxNumRePak != 0. Ignored if maxNumRePak == 0. */ - mfxU8 DeltaQP[8]; /*!< Option for repack feature. Ignored if maxNumRePak == 0 or maxNumRePak==0. If current - frame size > maxFrameSize and/or number of repacking (nRepack) for this frame <= maxNumRePak, + less than or equal to MaxFrameSize, or number of repacking for this frame is equal to MaxNumRePak. Repack is available + if there is driver support, MaxFrameSize !=0, and MaxNumRePak != 0. Ignored if MaxNumRePak == 0. */ + mfxU8 DeltaQP[8]; /*!< Option for repack feature. Ignored if MaxNumRePak == 0 or MaxNumRePak==0. If current + frame size > MaxFrameSize and/or number of repacking (nRepack) for this frame <= MaxNumRePak, PAK is called with QP = mfxBRCFrameCtrl::QpY + Sum(DeltaQP[i]), where i = [0,nRepack]. - Non zero DeltaQP[nRepack] are ignored if nRepack > maxNumRePak. - If repacking feature is on ( maxFrameSize & maxNumRePak are not zero), it is calculated by the encoder. */ - mfxU16 MaxNumRepak; /*!< Number of possible repacks in driver if current frame size > maxFrameSize. Ignored if maxFrameSize==0. - See maxFrameSize description. Possible values are in the range of 0 to 8. */ + Non zero DeltaQP[nRepack] are ignored if nRepack > MaxNumRePak. + If repacking feature is on ( MaxFrameSize & MaxNumRePak are not zero), it is calculated by the encoder. */ + mfxU16 MaxNumRepak; /*!< Number of possible repacks in driver if current frame size > MaxFrameSize. Ignored if MaxFrameSize==0. + See MaxFrameSize description. Possible values are in the range of 0 to 8. */ mfxU16 NumExtParam; /*!< Reserved for future use. */ mfxExtBuffer** ExtParam; /*!< Reserved for future use. */ } mfxBRCFrameCtrl; diff --git a/source/elements/oneVPL/include/vpl/mfxcamera.h b/source/elements/oneVPL/include/vpl/mfxcamera.h new file mode 100644 index 0000000000..66790b4e7e --- /dev/null +++ b/source/elements/oneVPL/include/vpl/mfxcamera.h @@ -0,0 +1,406 @@ +/*############################################################################ + # Copyright Intel Corporation + # + # SPDX-License-Identifier: MIT + ############################################################################*/ +#ifndef __MFXCAMERA_H__ +#define __MFXCAMERA_H__ + +#include "mfxcommon.h" + +#ifdef ONEVPL_EXPERIMENTAL + +#if !defined(__GNUC__) + #pragma warning(disable : 4201) +#endif + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/*! + The ExtendedBufferID enumerator itemizes and defines identifiers (BufferId) for extended buffers in camera processing. + The application should attach these extended buffers to the mfxVideoParam structure to configure camera processing through VideoVPP functions. + And Implementation capabilities of camera processing features can be delivered by the function MFXQueryImplsDescription via VPP configuration + mfxVPPDescription. + */ +enum { + /*! + This extended buffer is mandatory for camera raw acclerator initialization. See the mfxExtCamPipeControl structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_PIPECONTROL = MFX_MAKEFOURCC('C', 'P', 'P', 'C'), + /*! + This extended buffer defines control parameters for the Camera White Balance filter algorithm. See mfxExtCamWhiteBalance structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_WHITE_BALANCE = MFX_MAKEFOURCC('C', 'W', 'B', 'L'), + /*! + This extended buffer defines control parameters for the Camera Hot Pixel Removal filter algorithm. See mfxExtCamHotPixelRemoval structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_HOT_PIXEL_REMOVAL = MFX_MAKEFOURCC('C', 'H', 'P', 'R'), + /*! + This extended buffer defines control parameters for the Camera Black Level Correction filter algorithm. See mfxExtCamBlackLevelCorrection structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_BLACK_LEVEL_CORRECTION = MFX_MAKEFOURCC('C', 'B', 'L', 'C'), + /*! + This extended buffer defines control parameters for the Camera Vignette Correction filter algorithm. See mfxCamVignetteCorrectionParam structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_VIGNETTE_CORRECTION = MFX_MAKEFOURCC('C', 'V', 'G', 'T'), + /*! + This extended buffer defines control parameters for the Camera Bayer Denoise filter algorithm. See mfxExtCamBayerDenoise structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_BAYER_DENOISE = MFX_MAKEFOURCC('C', 'D', 'N', 'S'), + /*! + This extended buffer defines control parameters for the Camera Color Correction filter algorithm. See mfxExtCamColorCorrection3x3 structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_COLOR_CORRECTION_3X3 = MFX_MAKEFOURCC('C', 'C', '3', '3'), + /*! + This extended buffer defines control parameters for the Camera Padding. See mfxExtCamPadding structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_PADDING = MFX_MAKEFOURCC('C', 'P', 'A', 'D'), + /*! + This extended buffer defines control parameters for the Camera Forward Gamma Correction filter algorithm. See mfxExtCamFwdGamma structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_FORWARD_GAMMA_CORRECTION = + MFX_MAKEFOURCC('C', 'F', 'G', 'C'), + /*! + This extended buffer defines control parameters for the Camera Lens Geometry Distortion and Chroma Aberration Correction filter algorithm. See mfxExtCamLensGeomDistCorrection structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_LENS_GEOM_DIST_CORRECTION = + MFX_MAKEFOURCC('C', 'L', 'G', 'D'), + /*! + This extended buffer defines control parameters for the Camera 3DLUT filter algorithm. See mfxExtCam3DLut structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_3DLUT = MFX_MAKEFOURCC('C', 'L', 'U', 'T'), + /*! + This extended buffer defines control parameters for the Camera Total Color Control algorithm. See mfxExtCamTotalColorControl structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_TOTAL_COLOR_CONTROL = MFX_MAKEFOURCC('C', 'T', 'C', 'C'), + /*! + This extended buffer defines control parameters for the Camera YUV to RGB conversion algorithm. See mfxExtCamCscYuvRgb structure for details. + The application should attach this extended buffer to the mfxVideoParam structure to configure camera processing initialization. + */ + MFX_EXTBUF_CAM_CSC_YUV_RGB = MFX_MAKEFOURCC('C', 'C', 'Y', 'R') +}; + +/*! + A enumeration that defines white balance mode. +*/ +typedef enum { + MFX_CAM_WHITE_BALANCE_MANUAL = 0x0001, /*!< White balance manual mode.*/ + MFX_CAM_WHITE_BALANCE_AUTO = 0x0002 /*!< White balance auto mode.*/ +} mfxCamWhiteBalanceMode; + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A hint structure that configures Camera White Balance filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_WHITE_BALANCE. */ + mfxU32 + Mode; /*!< Specifies one of White Balance operation modes defined in enumeration mfxCamWhiteBalanceMode. */ + mfxF64 R; /*!< White Balance Red correction..*/ + mfxF64 G0; /*!< White Balance Green Top correction..*/ + mfxF64 B; /*!< White Balance Blue correction.*/ + mfxF64 G1; /*!< White Balance Green Bottom correction..*/ + mfxU32 reserved[8]; /*!< Reserved for future extension.*/ +} mfxExtCamWhiteBalance; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A hint structure that configures Camera Total Color Control filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_TOTAL_COLOR_CONTROL. */ + mfxU16 R; /*!< Red element.*/ + mfxU16 G; /*!< Green element.*/ + mfxU16 B; /*!< Blue element.*/ + mfxU16 C; /*!< Cyan element.*/ + mfxU16 M; /*!< Magenta element.*/ + mfxU16 Y; /*!< Yellow element.*/ + mfxU16 reserved[6]; /*!< Reserved for future extension.*/ +} mfxExtCamTotalColorControl; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A hint structure that configures Camera YUV to RGB format conversion. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_CSC_YUV_RGB. */ + mfxF32 PreOffset + [3]; /*!< Specifies offset for conversion from full range RGB input to limited range YUV for input color coordinate.*/ + mfxF32 Matrix[3] + [3]; /*!< Specifies conversion matrix with CSC coefficients.*/ + mfxF32 PostOffset + [3]; /*!< Specifies offset for conversion from full range RGB input to limited range YUV for output color coordinate.*/ + mfxU16 reserved[30]; /*!< Reserved for future extension.*/ +} mfxExtCamCscYuvRgb; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A hint structure that configures Camera Hot Pixel Removal filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_HOT_PIXEL_REMOVAL. */ + mfxU16 PixelThresholdDifference; /*!< Threshold for Hot Pixel difference. */ + mfxU16 PixelCountThreshold; /*!< Count pixel detection.*/ + mfxU16 reserved[32]; /*!< Reserved for future extension.*/ +} mfxExtCamHotPixelRemoval; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +typedef struct { + /*! + A hint structure that configures Camera black level correction. +*/ + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_BLACK_LEVEL_CORRECTION. */ + mfxU16 R; /*!< Black Level Red correction.*/ + mfxU16 G0; /*!< Black Level Green Top correction.*/ + mfxU16 B; /*!< Black Level Blue correction.*/ + mfxU16 G1; /*!< Black Level Green Bottom correction.*/ + mfxU32 reserved[4]; /*!< Reserved for future extension.*/ +} mfxExtCamBlackLevelCorrection; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A structure that defines Camera Vignette Correction Element. +*/ +typedef struct { + mfxU8 integer; /*!< Integer part of correction element.*/ + mfxU8 mantissa; /*!< Fractional part of correction element.*/ + mfxU8 reserved[6]; /*!< Reserved for future extension.*/ +} mfxCamVignetteCorrectionElement; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A structure that defines Camera Vignette Correction Parameters. +*/ +typedef struct { + mfxCamVignetteCorrectionElement R; /*!< Red correction element.*/ + mfxCamVignetteCorrectionElement G0; /*!< Green top correction element.*/ + mfxCamVignetteCorrectionElement B; /*!< Blue Correction element.*/ + mfxCamVignetteCorrectionElement G1; /*!< Green bottom correction element.*/ + mfxU32 reserved[4]; /*!< Reserved for future extension.*/ +} mfxCamVignetteCorrectionParam; +MFX_PACK_END() + +MFX_PACK_BEGIN_STRUCT_W_PTR() +/*! + A hint structure that configures Camera Vignette Correction filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_VIGNETTE_CORRECTION. */ + mfxU32 + Width; /*!< Width of Correction Map 2D buffer in mfxCamVignetteCorrectionParam elements. */ + mfxU32 + Height; /*!< Height of Correction Map 2D buffer in mfxCamVignetteCorrectionParam elements. */ + mfxU32 + Pitch; /*!< Pitch of Correction Map 2D buffer in mfxCamVignetteCorrectionParam elements. */ + mfxU32 reserved[7]; /*!< Reserved for future extension.*/ + + union { + mfxCamVignetteCorrectionParam* + CorrectionMap; /*!< 2D buffer of mfxCamVignetteCorrectionParam elements.*/ + mfxU64 reserved1; /*!< Reserved for alignment on 32bit and 64bit.*/ + }; +} mfxExtCamVignetteCorrection; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A hint structure that configures Camera Bayer denoise filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_BAYER_DENOISE. */ + mfxU16 Threshold; /*!< Level of denoise, legal values: [0:63].*/ + mfxU16 reserved[27]; /*!< Reserved for future extension.*/ +} mfxExtCamBayerDenoise; +MFX_PACK_END() + +MFX_PACK_BEGIN_STRUCT_W_L_TYPE() +/*! + A hint structure that configures Camera Color correction filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_COLOR_CORRECTION_3X3. */ + mfxF32 CCM + [3] + [3]; /*!< 3x3 dimension matrix providing RGB Color Correction coefficients.*/ + mfxU32 reserved[32]; /*!< Reserved for future extension.*/ +} mfxExtCamColorCorrection3x3; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A hint structure that configures Camera Padding. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_PADDING. */ + mfxU16 + Top; /*!< Specify number of padded columns respectively. Currently only 8 pixels supported for all dimensions..*/ + mfxU16 + Bottom; /*!< Specify number of padded columns respectively. Currently only 8 pixels supported for all dimensions..*/ + mfxU16 + Left; /*!< Specify number of padded rows respectively. Currently only 8 pixels supported for all dimensions..*/ + mfxU16 + Right; /*!< Specify number of padded rows respectively. Currently only 8 pixels supported for all dimensions..*/ + mfxU32 reserved[4]; /*!< Reserved for future extension.*/ +} mfxExtCamPadding; +MFX_PACK_END() + +/*! + A enumeration that defines Bayer mode. +*/ +typedef enum { + /*! + Pixel Representation BG + GR. + */ + MFX_CAM_BAYER_BGGR = 0x0000, + /*! + Pixel Representation RG + GB. + */ + MFX_CAM_BAYER_RGGB = 0x0001, + /*! + Pixel Representation GB + RG. + */ + MFX_CAM_BAYER_GBRG = 0x0002, + /*! + Pixel Representation GR + BG. + */ + MFX_CAM_BAYER_GRBG = 0x0003 +} mfxCamBayerFormat; + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A hint structure that configures camera pipe control. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_PIPECONTROL. */ + mfxU16 + RawFormat; /*!< Specifies one of the four Bayer patterns defined in mfxCamBayerFormat enumeration.*/ + mfxU16 reserved1; /*!< Reserved for future extension.*/ + mfxU32 reserved[5]; /*!< Reserved for future extension.*/ +} mfxExtCamPipeControl; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A structure that specifies forward gamma segment. +*/ +typedef struct { + mfxU16 Pixel; /*!< Pixel value.*/ + mfxU16 Red; /*!< Corrected Red value.*/ + mfxU16 Green; /*!< Corrected Green value.*/ + mfxU16 Blue; /*!< Corrected Blue value.*/ +} mfxCamFwdGammaSegment; +MFX_PACK_END() + +MFX_PACK_BEGIN_STRUCT_W_L_TYPE() +/*! + A hint structure that configures Camera Forward Gamma Correction filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_FORWARD_GAMMA_CORRECTION. */ + + mfxU16 reserved[19]; /*!< Reserved for future extension.*/ + mfxU16 NumSegments; /*!< Number of Gamma segments.*/ + union { + mfxCamFwdGammaSegment* Segment; /*!< Pointer to Gamma segments array.*/ + mfxU64 reserved1; /*!< Reserved for future extension.*/ + }; +} mfxExtCamFwdGamma; +MFX_PACK_END() + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A hint structure that configures Camera Lens Geometry Distortion and Chroma Aberration Correction filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_LENS_GEOM_DIST_CORRECTION. */ + + mfxF32 a[3]; /*!< Polynomial coefficients a for R/G/B*/ + mfxF32 b[3]; /*!< Polynomial coefficients b for R/G/B*/ + mfxF32 c[3]; /*!< Polynomial coefficients c for R/G/B*/ + mfxF32 d[3]; /*!< Polynomial coefficients d for R/G/B*/ + mfxU16 reserved[36]; /*!< Reserved for future extension.*/ +} mfxExtCamLensGeomDistCorrection; +MFX_PACK_END() + +/*! + A enumeration that defines 3DLUT size. +*/ +enum { + MFX_CAM_3DLUT17_SIZE = (17 * 17 * 17), /*!< 17^3 LUT size*/ + MFX_CAM_3DLUT33_SIZE = (33 * 33 * 33), /*!< 33^3 LUT size*/ + MFX_CAM_3DLUT65_SIZE = (65 * 65 * 65) /*!< 65^3 LUT size*/ +}; + +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! + A structure that defines 3DLUT entry. +*/ +typedef struct { + mfxU16 R; /*!< R channel*/ + mfxU16 G; /*!< G channel*/ + mfxU16 B; /*!< B channel*/ + mfxU16 Reserved; /*!< Reserved for future extension.*/ +} mfxCam3DLutEntry; +MFX_PACK_END() + +MFX_PACK_BEGIN_STRUCT_W_L_TYPE() +/*! + A hint structure that configures Camera 3DLUT filter. +*/ +typedef struct { + mfxExtBuffer + Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUF_CAM_3DLUT. */ + + mfxU16 reserved[10]; /*!< Reserved for future extension.*/ + mfxU32 + Size; /*!< LUT size, defined in MFX_CAM_3DLUT17/33/65_SIZE enumeration.*/ + union { + mfxCam3DLutEntry* + Table; /*!< Pointer to mfxCam3DLutEntry, size of each dimension depends on LUT size, e.g. LUT[17][17][17] for 17x17x17 look up table.*/ + mfxU64 reserved1; /*!< Reserved for future extension.*/ + }; +} mfxExtCam3DLut; +MFX_PACK_END() + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // ONEVPL_EXPERIMENTAL +#endif // __MFXCAMERA_H__ \ No newline at end of file diff --git a/source/elements/oneVPL/include/vpl/mfxcommon.h b/source/elements/oneVPL/include/vpl/mfxcommon.h index c5896df1db..b966739db0 100644 --- a/source/elements/oneVPL/include/vpl/mfxcommon.h +++ b/source/elements/oneVPL/include/vpl/mfxcommon.h @@ -34,7 +34,7 @@ MFX_PACK_END() #define MFX_REFINTERFACE_VERSION MFX_STRUCT_VERSION(1, 0) MFX_PACK_BEGIN_STRUCT_W_PTR() -/*! The structure respresents reference counted interface structure. +/*! The structure represents reference counted interface structure. The memory is allocated and released by the implementation. */ typedef struct mfxRefInterface { @@ -191,7 +191,10 @@ enum { MFX_GPUCOPY_DEFAULT = 0, /*!< Use default mode for the legacy Intel(r) Media SDK implementation. */ MFX_GPUCOPY_ON = 1, /*!< The hint to enable GPU accelerated copying when it is supported by the library. If the library doesn't support GPU accelerated copy the operation will be made by CPU. */ - MFX_GPUCOPY_OFF = 2 /*!< Disable GPU accelerated copying. */ + MFX_GPUCOPY_OFF = 2, /*!< Disable GPU accelerated copying. */ +#ifdef ONEVPL_EXPERIMENTAL + MFX_GPUCOPY_SAFE = 3 /*!< The hint to disable buffer caching for GPU accelerated copying. Actual when GPU accelerated copying is supported by the library. */ +#endif }; MFX_PACK_BEGIN_STRUCT_W_PTR() @@ -534,13 +537,13 @@ MFX_PACK_END() #define MFX_EXTENDEDDEVICEID_VERSION MFX_STRUCT_VERSION(1, 0) MFX_PACK_BEGIN_USUAL_STRUCT() -/*! Specifies variouse physical device properties for device matching and identification outside of oneVPL. */ +/*! Specifies various physical device properties for device matching and identification outside of oneVPL. */ typedef struct { mfxStructVersion Version; /*!< Version of the structure. */ mfxU16 VendorID; /*!< PCI vendor ID. */ mfxU16 DeviceID; /*!< PCI device ID. */ mfxU32 PCIDomain; /*!< PCI bus domain. Equals to '0' if OS doesn't support it or - has sequential numbering of buses accross domains. */ + has sequential numbering of buses across domains. */ mfxU32 PCIBus; /*!< The number of the bus that the physical device is located on. */ mfxU32 PCIDevice; /*!< The index of the physical device on the bus. */ mfxU32 PCIFunction; /*!< The function number of the device on the physical device. */ diff --git a/source/elements/oneVPL/include/vpl/mfxdefs.h b/source/elements/oneVPL/include/vpl/mfxdefs.h index 35bfb0fc85..9f3fd78f07 100644 --- a/source/elements/oneVPL/include/vpl/mfxdefs.h +++ b/source/elements/oneVPL/include/vpl/mfxdefs.h @@ -8,7 +8,7 @@ #define __MFXDEFS_H__ #define MFX_VERSION_MAJOR 2 -#define MFX_VERSION_MINOR 7 +#define MFX_VERSION_MINOR 8 // 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 @@ -148,6 +148,9 @@ typedef void* mfxHDL; /*!< Handle type. */ typedef mfxHDL mfxMemId; /*!< Memory ID type. */ typedef void* mfxThreadTask; /*!< Thread task type. */ typedef char mfxChar; /*!< UTF-8 byte. */ +#ifdef ONEVPL_EXPERIMENTAL +typedef unsigned short mfxFP16; /*!< Half precision floating point, 16 bit type. */ +#endif /* MFX structures version info */ MFX_PACK_BEGIN_USUAL_STRUCT() @@ -189,6 +192,10 @@ typedef enum { MFX_DATA_TYPE_I64, /*!< 64-bit signed integer. */ MFX_DATA_TYPE_F32, /*!< 32-bit single precision floating point. */ MFX_DATA_TYPE_F64, /*!< 64-bit double precision floating point. */ + MFX_DATA_TYPE_PTR, /*!< Generic type pointer. */ +#ifdef ONEVPL_EXPERIMENTAL + MFX_DATA_TYPE_FP16, /*!< 16-bit half precision floating point. */ +#endif }mfxDataType; /*! The mfxVariantType enumerator data types for mfxVariantType. */ @@ -204,7 +211,10 @@ typedef enum { MFX_VARIANT_TYPE_I64 = MFX_DATA_TYPE_I64, /*!< 64-bit signed integer. */ MFX_VARIANT_TYPE_F32 = MFX_DATA_TYPE_F32, /*!< 32-bit single precision floating point. */ MFX_VARIANT_TYPE_F64 = MFX_DATA_TYPE_F64, /*!< 64-bit double precision floating point. */ - MFX_VARIANT_TYPE_PTR, /*!< Generic type pointer. */ + MFX_VARIANT_TYPE_PTR = MFX_DATA_TYPE_PTR, /*!< Generic type pointer. */ +#ifdef ONEVPL_EXPERIMENTAL + MFX_VARIANT_TYPE_FP16 = MFX_DATA_TYPE_FP16, /*!< 16-bit half precision floating point. */ +#endif } mfxVariantType; MFX_PACK_BEGIN_STRUCT_W_PTR() @@ -224,6 +234,9 @@ typedef struct { mfxI64 I64; /*!< mfxI64 data. */ mfxF32 F32; /*!< mfxF32 data. */ mfxF64 F64; /*!< mfxF64 data. */ +#ifdef ONEVPL_EXPERIMENTAL + mfxFP16 FP16; /*!< mfxFP16 data. */ +#endif mfxHDL Ptr; /*!< Pointer. When this points to a string the string must be null terminated. */ } Data; /*!< Value data member. */ } mfxVariant; diff --git a/source/elements/oneVPL/include/vpl/mfxencodestats.h b/source/elements/oneVPL/include/vpl/mfxencodestats.h index 8dc58450fc..2870c78e84 100644 --- a/source/elements/oneVPL/include/vpl/mfxencodestats.h +++ b/source/elements/oneVPL/include/vpl/mfxencodestats.h @@ -335,7 +335,7 @@ typedef struct { mfxU32 NumCTU; /*!< number of CTUs per frame for H.265. */ }; - mfxBlockSize BlockSize; /*! For H.264 it is always 16x16 coresponding to MB size. + mfxBlockSize BlockSize; /*! For H.264 it is always 16x16 corresponding to MB size. In H.265 it's normalized to 4x4, so for each CU we calculate number of 4x4 which belongs to the block. */ mfxU32 NumIntraBlock; /*! Number of intra blocks in the frame. The size of block is defined by BlockSize. @@ -377,7 +377,7 @@ typedef mfxEncodeSliceStats mfxEncodeTileStats; MFX_PACK_BEGIN_STRUCT_W_PTR() -/*! The structure respresnts reference counted container for output after encoding operation which includes statistics +/*! The structure represents reference counted container for output after encoding operation which includes statistics and synchronization primitive for compressed bitstream. The memory is allocated and released by the library. */ @@ -442,7 +442,7 @@ MFX_PACK_BEGIN_STRUCT_W_PTR() typedef struct { mfxExtBuffer Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_ENCODESTATS_BLK. */ mfxU16 EncodeStatsFlags; /*! What statistics is required: block/slice/tile/frame level or any combinations. - In case of slice or tile output statistics for one slice or tile will be availbale only.*/ + In case of slice or tile output statistics for one slice or tile will be available only.*/ mfxEncodeStatsMode Mode; /*!< What encoding mode should be used to gather statistics. */ mfxEncodeStatsContainer *EncodeStatsContainer; /*!< encode output, filled by the implementation. */ mfxU32 reserved[8]; diff --git a/source/elements/oneVPL/include/vpl/mfxjpeg.h b/source/elements/oneVPL/include/vpl/mfxjpeg.h index 21e5e39ce0..7727575c4b 100644 --- a/source/elements/oneVPL/include/vpl/mfxjpeg.h +++ b/source/elements/oneVPL/include/vpl/mfxjpeg.h @@ -85,7 +85,7 @@ typedef struct { mfxExtBuffer Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_JPEG_QT. */ mfxU16 reserved[7]; - mfxU16 NumTable; /*!< Number of quantization tables defined in Qmarray. */ + mfxU16 NumTable; /*!< Number of quantization tables defined in Qm array. */ mfxU16 Qm[4][64]; /*!< Quantization table values. */ } mfxExtJPEGQuantTables; diff --git a/source/elements/oneVPL/include/vpl/mfxstructures.h b/source/elements/oneVPL/include/vpl/mfxstructures.h index 7e3940009b..bc1abd86ae 100644 --- a/source/elements/oneVPL/include/vpl/mfxstructures.h +++ b/source/elements/oneVPL/include/vpl/mfxstructures.h @@ -174,6 +174,9 @@ enum { /*! 8bit per sample 4:4:4 format packed in 32 bits, X=unused/undefined, 'X' channel is 8 MSBs, then 'Y', then 'U', and then 'V' channels. This format should be mapped to VA_FOURCC_XYUV. */ MFX_FOURCC_XYUV = MFX_MAKEFOURCC('X','Y','U','V'), #endif +#ifdef ONEVPL_EXPERIMENTAL + MFX_FOURCC_ABGR16F = MFX_MAKEFOURCC('B', 'G', 'R', 'F'), /*!< 16 bits float point ABGR color format packed in 64 bits. 'A' channel is 16 MSBs, then 'B', then 'G' and then 'R' channels. This format should be mapped to DXGI_FORMAT_R16G16B16A16_FLOAT or D3DFMT_A16B16G16R16F formats.. */ +#endif }; /* PicStruct */ @@ -268,6 +271,19 @@ typedef struct } mfxA2RGB10; MFX_PACK_END() +#ifdef ONEVPL_EXPERIMENTAL +MFX_PACK_BEGIN_USUAL_STRUCT() +/*! Specifies "pixel" in ABGR 16 bit half float point color format */ +typedef struct +{ + mfxFP16 R; /*!< R component. */ + mfxFP16 G; /*!< G component. */ + mfxFP16 B; /*!< B component. */ + mfxFP16 A; /*!< A component. */ +} mfxABGR16FP; +MFX_PACK_END() +#endif + /*! Describes frame buffer pointers. */ MFX_PACK_BEGIN_STRUCT_W_L_TYPE() typedef struct { @@ -330,6 +346,9 @@ typedef struct { mfxU16 *V16; /*!< V16 channel. */ mfxU8 *B; /*!< B channel. */ mfxA2RGB10 *A2RGB10; /*!< A2RGB10 channel for A2RGB10 format (merged ARGB). */ +#ifdef ONEVPL_EXPERIMENTAL + mfxABGR16FP* ABGRFP16; /*!< ABGRFP16 channel for half float ARGB format (use this merged one due to no separate FP16 Alpha Channel). */ +#endif }; mfxU8 *A; /*!< A channel. */ mfxMemId MemId; /*!< Memory ID of the data buffers. Ignored if any of the preceding data pointers is non-zero. */ @@ -703,6 +722,9 @@ typedef struct { mfxU16 InitialDelayInKB; /*! Quantization Parameter (QP) for I-frames for constant QP mode (CQP). Zero QP is not valid and means that the default value is assigned by the library. Non-zero QPI might be clipped to supported QPI range. + @note In the HEVC design, a further adjustment to QPs can occur based on bit depth. + Adjusted QPI value = QPI - (6 * (BitDepthLuma - 8)) for BitDepthLuma in the range [8,14]. + For HEVC_MAIN10, we minus (6*(10-8)=12) on our side and continue. @note Default QPI value is implementation dependent and subject to change without additional notice in this document. */ mfxU16 QPI; mfxU16 Accuracy; /*!< Specifies accuracy range in the unit of tenth of percent. */ @@ -713,6 +735,9 @@ typedef struct { mfxU16 TargetKbps; /*! Quantization Parameter (QP) for P-frames for constant QP mode (CQP). Zero QP is not valid and means that the default value is assigned by the library. Non-zero QPP might be clipped to supported QPI range. + @note In the HEVC design, a further adjustment to QPs can occur based on bit depth. + Adjusted QPP value = QPP - (6 * (BitDepthLuma - 8)) for BitDepthLuma in the range [8,14]. + For HEVC_MAIN10, we minus (6*(10-8)=12) on our side and continue. @note Default QPP value is implementation dependent and subject to change without additional notice in this document. */ mfxU16 QPP; mfxU16 ICQQuality; /*!< Used by the Intelligent Constant Quality (ICQ) bitrate control algorithm. Values are in the 1 to 51 range, where 1 corresponds the best quality. */ @@ -722,6 +747,9 @@ typedef struct { mfxU16 MaxKbps; /*! Quantization Parameter (QP) for B-frames for constant QP mode (CQP). Zero QP is not valid and means that the default value is assigned by the library. Non-zero QPI might be clipped to supported QPB range. + @note In the HEVC design, a further adjustment to QPs can occur based on bit depth. + Adjusted QPB value = QPB - (6 * (BitDepthLuma - 8)) for BitDepthLuma in the range [8,14]. + For HEVC_MAIN10, we minus (6*(10-8)=12) on our side and continue. @note Default QPB value is implementation dependent and subject to change without additional notice in this document. */ mfxU16 QPB; mfxU16 Convergence; /*!< Convergence period in the unit of 100 frames. */ @@ -1402,7 +1430,7 @@ typedef struct { */ mfxU16 NumMbPerSlice; /*! - Enables usage of mfxEncodeCtrl::SkipFrameparameter. See the SkipFrame enumerator for values of this option. + Enables usage of mfxEncodeCtrl::SkipFrame parameter. See the SkipFrame enumerator for values of this option. @note Not all codecs and implementations support this value. Use the Query API function to check if this feature is supported. */ mfxU16 SkipFrame; @@ -1478,7 +1506,10 @@ enum { enum { MFX_CONTENT_UNKNOWN = 0, MFX_CONTENT_FULL_SCREEN_VIDEO = 1, - MFX_CONTENT_NON_VIDEO_SCREEN = 2 + MFX_CONTENT_NON_VIDEO_SCREEN = 2, +#ifdef ONEVPL_EXPERIMENTAL + MFX_CONTENT_NOISY_VIDEO = 3 +#endif }; /*! The PRefType enumerator itemizes models of reference list construction and DPB management when GopRefDist=1. */ @@ -1717,7 +1748,7 @@ typedef struct { */ mfxU16 AdaptiveCQM; /*! - If this flag is set to ON, encoder adaptively selects list of reference frames to imrove encoding quality. + If this flag is set to ON, encoder adaptively selects list of reference frames to improve encoding quality. Enabling of the flag can increase computation complexity and introduce additional delay. If this flag is set to OFF, regular reference frames are used for encoding. */ @@ -1979,7 +2010,7 @@ enum { */ MFX_EXTBUFF_PRED_WEIGHT_TABLE = MFX_MAKEFOURCC('E','P','W','T'), /*! - See the mfxExtDitrtyRect structure for details. + See the mfxExtDirtyRect structure for details. */ MFX_EXTBUFF_DIRTY_RECTANGLES = MFX_MAKEFOURCC('D','R','O','I'), /*! @@ -2043,22 +2074,22 @@ enum { */ MFX_EXTBUFF_CONTENT_LIGHT_LEVEL_INFO = MFX_MAKEFOURCC('L', 'L', 'I', 'S'), /*! - This extended buffer configures HDR SEI message. See the mfxExtMasteringDisplayColourVolume structure for details. If colour volume changes + This extended buffer configures HDR SEI message. See the mfxExtMasteringDisplayColourVolume structure for details. If color volume changes per frame, the application can attach this buffer to the mfxFrameData structure for video processing. */ MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME = MFX_MAKEFOURCC('D', 'C', 'V', 'S'), /*! This extended buffer configures HDR SEI message. See the mfxExtMasteringDisplayColourVolume structure for details. The application can - attach this buffer to the mfxVideoParam structure for the input of video processing if the mastering display colour volume changes per + attach this buffer to the mfxVideoParam structure for the input of video processing if the mastering display color volume changes per sequence. In this case, this buffer should be together with MFX_EXTBUFF_CONTENT_LIGHT_LEVEL_INFO to indicate the light level and mastering - colour volume of the input of video processing. If colour Volume changes per frame instead of per sequence, the application can attach + color volume of the input of video processing. If color Volume changes per frame instead of per sequence, the application can attach MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME to mfxFrameData for frame based processing. */ MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME_IN = MFX_MAKEFOURCC('D', 'C', 'V', 'I'), /*! This extended buffer configures HDR SEI message. See the mfxExtMasteringDisplayColourVolume structure for details. The application can - attach this buffer to the mfxVideoParam structure for the output of video processing if the mastering display colour volume changes per - sequence. If colour volume changes per frame instead of per sequence, the application can attach the buffer with MFX_EXTBUFF_MASTERING_ + attach this buffer to the mfxVideoParam structure for the output of video processing if the mastering display color volume changes per + sequence. If color volume changes per frame instead of per sequence, the application can attach the buffer with MFX_EXTBUFF_MASTERING_ DISPLAY_COLOUR_VOLUME to mfxFrameData for frame based processing. */ MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME_OUT = MFX_MAKEFOURCC('D', 'C', 'V', 'O'), @@ -2143,13 +2174,13 @@ enum { See the mfxExtTemporalLayers structure for more details. */ MFX_EXTBUFF_UNIVERSAL_TEMPORAL_LAYERS = MFX_MAKEFOURCC('U', 'T', 'M', 'P'), -#ifdef ONEVPL_EXPERIMENTAL /*! This extended buffer defines additional encoding controls for reference list. See the mfxExtRefListCtrl structure for details. The application can attach this buffer to the mfxVideoParam structure for encoding & decoding initialization, or the mfxEncodeCtrl structure for per-frame encoding configuration. */ MFX_EXTBUFF_UNIVERSAL_REFLIST_CTRL = MFX_EXTBUFF_AVC_REFLIST_CTRL, +#ifdef ONEVPL_EXPERIMENTAL /*! See the mfxExtEncodeStats structure for details. */ @@ -2214,7 +2245,7 @@ MFX_PACK_BEGIN_USUAL_STRUCT() typedef struct { mfxExtBuffer Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_VPP_DENOISE2. */ mfxDenoiseMode Mode; /*!< Indicates the mode of denoise. mfxDenoiseMode enumerator. */ - mfxU16 Strength; /*!< Denoise strength in manaul mode. Value of 0-100 (inclusive) indicates the strength of denoise. + mfxU16 Strength; /*!< Denoise strength in manual mode. Value of 0-100 (inclusive) indicates the strength of denoise. The strength of denoise controls degree of possible changes of pixel values; the bigger the strength the larger the change is. */ mfxU16 reserved[15]; @@ -2830,28 +2861,34 @@ typedef struct { MFX_PACK_END() -/*! The InsertHDRPayload enumerator itemizes HDR payloads insertion rules. */ +/*! + The InsertHDRPayload enumerator itemizes HDR payloads insertion rules in the encoder, + and indicates if there is valid HDR SEI message in the clip in the decoder. +*/ enum { - MFX_PAYLOAD_OFF = 0, /*!< Do not insert payload. */ - MFX_PAYLOAD_IDR = 1 /*!< Insert payload on IDR frames. */ + MFX_PAYLOAD_OFF = 0, /*!< Do not insert payload when encoding; + Clip does not have valid HDE SEI when decoding. */ + MFX_PAYLOAD_IDR = 1 /*!< Insert payload on IDR frames when encoding; + Clip has valid HDE SEI when decoding. */ }; MFX_PACK_BEGIN_USUAL_STRUCT() /*! Handle the HDR SEI message. - If the application attaches this structure to the mfxEncodeCtrl structure - at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle. - - If the application attaches this + During encoding: If the application attaches this structure to the mfxEncodeCtrl structure at runtime, + the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle. If the application attaches this structure to the mfxVideoParam structure during initialization or reset, the encoder inserts the HDR SEI message based on InsertPayloadToggle. - If the application attaches this structure for video processing, InsertPayloadToggle will be ignored. + During video processing: If the application attaches this structure for video processing, InsertPayloadToggle will be ignored. + And DisplayPrimariesX[3], DisplayPrimariesY[3] specify the color primaries where 0,1,2 specifies Red, Green, Blue respectively. - If the application attaches this structure to the mfxFrameSurface1 structure at runtime + During decoding: If the application attaches this structure to the mfxFrameSurface1 structure at runtime which will seed to the MFXVideoDECODE_DecodeFrameAsync() as surface_work parameter, the decoder will parse the HDR SEI message if the bitstream include HDR SEI message per frame. - The parsed HDR SEI will be attached to the ExtendBuffer of surface_out parameter of MFXVideoDECODE_DecodeFrameAsync(). + The parsed HDR SEI will be attached to the ExtendBuffer of surface_out parameter of MFXVideoDECODE_DecodeFrameAsync() + with flag `InsertPayloadToggle` to indicate if there is valid HDR SEI message in the clip. + `InsertPayloadToggle` will be set to `MFX_PAYLOAD_IDR` if OneVPL get valid HDR SEI, otherwise it will be set to `MFX_PAYLOAD_OFF`. This function is support for HEVC only now. Field semantics are defined in ITU-T* H.265 Annex D. @@ -2880,19 +2917,19 @@ MFX_PACK_BEGIN_USUAL_STRUCT() /*! Handle the HDR SEI message. - If the application attaches this structure to the mfxEncodeCtrl - structure at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle. + During encoding: If the application attaches this structure to the mfxEncodeCtrl structure at runtime, + the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle. If the application + attaches this structure to the mfxVideoParam structure during initialization or reset, the encoder inserts + the HDR SEI message based on InsertPayloadToggle. - If the application - attaches this structure to the mfxVideoParam structure during initialization or reset, the encoder inserts the HDR SEI message based on - InsertPayloadToggle. + During video processing: If the application attaches this structure for video processing, InsertPayloadToggle will be ignored. - If the application attaches this structure for video processing, InsertPayloadToggle will be ignored. - - If the application attaches this structure to the mfxFrameSurface1 structure at runtime + During decoding: If the application attaches this structure to the mfxFrameSurface1 structure at runtime which will seed to the MFXVideoDECODE_DecodeFrameAsync() as surface_work parameter, the decoder will parse the HDR SEI message if the bitstream include HDR SEI message per frame. - The parsed HDR SEI will be attached to the ExtendBuffer of surface_out parameter of MFXVideoDECODE_DecodeFrameAsync(). + The parsed HDR SEI will be attached to the ExtendBuffer of surface_out parameter of MFXVideoDECODE_DecodeFrameAsync() + with flag `InsertPayloadToggle` to indicate if there is valid HDR SEI message in the clip. + `InsertPayloadToggle` will be set to `MFX_PAYLOAD_IDR` if OneVPL get valid HDR SEI, otherwise it will be set to `MFX_PAYLOAD_OFF`. This function is support for HEVC only now. Field semantics are defined in ITU-T* H.265 Annex D. @@ -3466,7 +3503,7 @@ enum { MFX_PACK_BEGIN_USUAL_STRUCT() /*! - Specifies per-MB or per-CU mode and QP or deltaQP value depending on the mode type. + Specifies per-MB or per-CU mode and QP or DeltaQP value depending on the mode type. */ typedef struct{ union { @@ -3499,7 +3536,12 @@ MFX_PACK_BEGIN_STRUCT_W_L_TYPE() typedef struct { mfxExtBuffer Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_MBQP. */ +#ifdef ONEVPL_EXPERIMENTAL + mfxU32 reserved[9]; + mfxU32 Pitch; /*!< Distance in bytes between the start of two consecutive rows in the QP array. */ +#else mfxU32 reserved[10]; +#endif mfxU16 Mode; /*!< Defines QP update mode. See MBQPMode enumerator for more details. */ mfxU16 BlockSize; /*!< QP block size, valid for HEVC only during Init and Runtime. */ mfxU32 NumQPAlloc; /*!< Size of allocated by application QP or DeltaQP array. */ @@ -3954,9 +3996,7 @@ typedef mfxExtAVCRefListCtrl mfxExtHEVCRefListCtrl; typedef mfxExtAVCRefLists mfxExtHEVCRefLists; typedef mfxExtAvcTemporalLayers mfxExtHEVCTemporalLayers; -#ifdef ONEVPL_EXPERIMENTAL typedef mfxExtAVCRefListCtrl mfxExtRefListCtrl; -#endif /* The MirroringType enumerator itemizes mirroring types. */ enum @@ -4453,7 +4493,7 @@ typedef struct { mfxU16 NumTileRows; /*!< Number of tile rows, default value is 1. */ mfxU16 NumTileColumns; /*!< Number of tile columns, default value is 1. */ - mfxU16 NumTileGroups; /*!< Number of tile groups, it will be ingored if the tile groups num is invalid, default value is 1. */ + mfxU16 NumTileGroups; /*!< Number of tile groups, it will be ignored if the tile groups num is invalid, default value is 1. */ mfxU16 reserved[5]; } mfxExtAV1TileParam; @@ -4675,7 +4715,7 @@ typedef struct mfxSurfaceArray MFX_PACK_END() MFX_PACK_BEGIN_STRUCT_W_PTR() -/*! The structure is used for VPP channels initializtion in Decode_VPP component. */ +/*! The structure is used for VPP channels initialization in Decode_VPP component. */ typedef struct { mfxFrameInfo VPP; /*!< The configuration parameters of VPP filters per each channel. */ mfxU16 Protected; /*!< Specifies the content protection mechanism. */ @@ -4687,7 +4727,7 @@ typedef struct { MFX_PACK_END() MFX_PACK_BEGIN_USUAL_STRUCT() -/*! The structure describes rectangle coordinates wat can bse used for ROI or for Cropping. */ +/*! The structure describes rectangle coordinates that can be used for ROI or for Cropping. */ typedef struct { mfxU16 Left; /*!< X coordinate of region of top-left corner of rectangle. */ mfxU16 Top; /*!< Y coordinate of region of top-left corner of rectangle. */ diff --git a/source/elements/oneVPL/include/vpl/mfxsurfacepool.h b/source/elements/oneVPL/include/vpl/mfxsurfacepool.h index a8908a6228..0a2bed0ef4 100644 --- a/source/elements/oneVPL/include/vpl/mfxsurfacepool.h +++ b/source/elements/oneVPL/include/vpl/mfxsurfacepool.h @@ -37,7 +37,7 @@ typedef struct { */ mfxU32 DeltaToAllocateOnTheFly; union { - mfxVPPPoolType VPPPoolType; /*!< Defines what VPP pool is targeted - input or ouput. Ignored for other components. */ + mfxVPPPoolType VPPPoolType; /*!< Defines what VPP pool is targeted - input or output. Ignored for other components. */ mfxU32 reserved; }; mfxU32 Wait; /*!< Time in milliseconds for GetSurfaceForXXX() and DecodeFrameAsync functions to wait until surface will be available. */ diff --git a/source/elements/oneVPL/include/vpl/mfxvideo.h b/source/elements/oneVPL/include/vpl/mfxvideo.h index c72d17df80..bba95ded7d 100755 --- a/source/elements/oneVPL/include/vpl/mfxvideo.h +++ b/source/elements/oneVPL/include/vpl/mfxvideo.h @@ -971,7 +971,7 @@ mfxStatus MFX_CDECL MFXVideoVPP_RunFrameVPPAsync(mfxSession session, mfxFrameSur @return MFX_ERR_NONE The output frame is ready after synchronization. \n MFX_ERR_MORE_DATA Need more input frames before VPP can produce an output. \n - MFX_ERR_MEMORY_ALLOC The function failed to allocate output videoframe. \n + MFX_ERR_MEMORY_ALLOC The function failed to allocate output video frame. \n MFX_ERR_DEVICE_LOST Hardware device was lost. \verbatim embed:rst @@ -991,7 +991,7 @@ mfxStatus MFX_CDECL MFXVideoVPP_ProcessFrameAsync(mfxSession session, mfxFrameSu but application has to provide array of pointers to mfxVideoChannelParam and num_channel_param - number of channels. Application is responsible for memory allocation for mfxVideoChannelParam parameters and for each channel it should specify channel IDs: mfxVideoChannelParam::mfxFrameInfo::ChannelId. ChannelId should be unique value within one session. ChannelID equals to the 0 - is reserved for the orginal decoded frame. + is reserved for the original decoded frame. The application can attach mfxExtInCrops to mfxVideoChannelParam::ExtParam to annotate input video frame if it wants to enable letterboxing operation. @param[in] session SDK session handle. diff --git a/source/elements/oneVPL/source/API_ref/VPL_enums.rst b/source/elements/oneVPL/source/API_ref/VPL_enums.rst index e2ccaee42d..5fbb388afe 100644 --- a/source/elements/oneVPL/source/API_ref/VPL_enums.rst +++ b/source/elements/oneVPL/source/API_ref/VPL_enums.rst @@ -675,6 +675,9 @@ The ColorFourCC enumerator itemizes color formats. .. doxygenenumvalue:: MFX_FOURCC_XYUV :project: oneVPL +.. doxygenenumvalue:: MFX_FOURCC_ABGR16F + :project: oneVPL + ----------- ContentInfo ----------- @@ -690,6 +693,9 @@ The ContentInfo enumerator itemizes content types for the encoding session. .. doxygenenumvalue:: MFX_CONTENT_NON_VIDEO_SCREEN :project: oneVPL +.. doxygenenumvalue:: MFX_CONTENT_NOISY_VIDEO + :project: oneVPL + ---------- Corruption ---------- diff --git a/source/elements/oneVPL/source/API_ref/VPL_structs.rst b/source/elements/oneVPL/source/API_ref/VPL_structs.rst index 83a8d555b5..f4d2f6e026 100644 --- a/source/elements/oneVPL/source/API_ref/VPL_structs.rst +++ b/source/elements/oneVPL/source/API_ref/VPL_structs.rst @@ -51,6 +51,11 @@ Structure Reference :start-after: struct_decode_vpp_begin: :end-before: struct_decode_vpp_end: +:ref:`struct_camera` + .. include:: VPL_structs_camera.rst + :start-after: struct_camera_begin: + :end-before: struct_camera_end: + .. toctree:: :maxdepth: 1 :hidden: @@ -64,6 +69,7 @@ Structure Reference VPL_structs_vpp VPL_structs_protected VPL_structs_decode_vpp + VPL_structs_camera diff --git a/source/elements/oneVPL/source/API_ref/VPL_structs_camera.rst b/source/elements/oneVPL/source/API_ref/VPL_structs_camera.rst new file mode 100644 index 0000000000..241da7805e --- /dev/null +++ b/source/elements/oneVPL/source/API_ref/VPL_structs_camera.rst @@ -0,0 +1,165 @@ +.. SPDX-FileCopyrightText: 2019-2022 Intel Corporation +.. +.. SPDX-License-Identifier: CC-BY-4.0 + +.. _struct_camera: + +================= +Camera Structures +================= + +.. _struct_camera_begin: + +Structures used by Camera Raw Acceleration Processing. + +.. _struct_camera_end: + +--- +API +--- + +.. contents:: + :local: + :depth: 1 + +mfxExtCamWhiteBalance +--------------------- + +.. doxygenstruct:: mfxExtCamWhiteBalance + :project: oneVPL + :members: + :protected-members: + +mfxExtCamTotalColorControl +-------------------------- + +.. doxygenstruct:: mfxExtCamTotalColorControl + :project: oneVPL + :members: + :protected-members: + +mfxExtCamCscYuvRgb +------------------ + +.. doxygenstruct:: mfxExtCamCscYuvRgb + :project: oneVPL + :members: + :protected-members: + +mfxExtCamHotPixelRemoval +------------------------ + +.. doxygenstruct:: mfxExtCamHotPixelRemoval + :project: oneVPL + :members: + :protected-members: + +mfxExtCamBlackLevelCorrection +----------------------------- + +.. doxygenstruct:: mfxExtCamBlackLevelCorrection + :project: oneVPL + :members: + :protected-members: + +mfxCamVignetteCorrectionElement +------------------------------- + +.. doxygenstruct:: mfxCamVignetteCorrectionElement + :project: oneVPL + :members: + :protected-members: + +mfxCamVignetteCorrectionParam +----------------------------- + +.. doxygenstruct:: mfxCamVignetteCorrectionParam + :project: oneVPL + :members: + :protected-members: + :undoc-members: + +mfxExtCamVignetteCorrection +--------------------------- + +.. doxygenstruct:: mfxExtCamVignetteCorrection + :project: oneVPL + :members: + :protected-members: + :undoc-members: + +mfxExtCamBayerDenoise +--------------------- + +.. doxygenstruct:: mfxExtCamBayerDenoise + :project: oneVPL + :members: + :protected-members: + :undoc-members: + +mfxExtCamColorCorrection3x3 +--------------------------- + +.. doxygenstruct:: mfxExtCamColorCorrection3x3 + :project: oneVPL + :members: + :protected-members: + :undoc-members: + +mfxExtCamPadding +---------------- + +.. doxygenstruct:: mfxExtCamPadding + :project: oneVPL + :members: + :protected-members: + :undoc-members: + +mfxExtCamPipeControl +-------------------- + +.. doxygenstruct:: mfxExtCamPipeControl + :project: oneVPL + :members: + :protected-members: + :undoc-members: + +mfxCamFwdGammaSegment +--------------------- + +.. doxygenstruct:: mfxCamFwdGammaSegment + :project: oneVPL + :members: + :protected-members: + +mfxExtCamFwdGamma +----------------- + +.. doxygenstruct:: mfxExtCamFwdGamma + :project: oneVPL + :members: + :protected-members: + +mfxExtCamLensGeomDistCorrection +------------------------------- + +.. doxygenstruct:: mfxExtCamLensGeomDistCorrection + :project: oneVPL + :members: + :protected-members: + +mfxCam3DLutEntry +---------------- + +.. doxygenstruct:: mfxCam3DLutEntry + :project: oneVPL + :members: + :protected-members: + +mfxExtCam3DLut +-------------- + +.. doxygenstruct:: mfxExtCam3DLut + :project: oneVPL + :members: + :protected-members: diff --git a/source/elements/oneVPL/source/Experimental.rst b/source/elements/oneVPL/source/Experimental.rst index 52d9220528..c4aa107695 100644 --- a/source/elements/oneVPL/source/Experimental.rst +++ b/source/elements/oneVPL/source/Experimental.rst @@ -7,8 +7,8 @@ oneVPL Experimental API ======================= All API entries defined under the ONEVPL_EXPERIMENTAL macro are considered as -expiremental. Backward compatibility is not guaranteed for these features. -Future presense is not guaranteed as well. +experimental. Backward compatibility is not guaranteed for these features. +Future presence is not guaranteed as well. By default, experimental API is turned off in the header files. To enable it, need to define ONEVPL_EXPERIMENTAL macro during the application @@ -17,6 +17,7 @@ compilation stage. The following is a list of experimental interfaces, starting from API version 2.6. +.. _experimental-api-table: .. list-table:: Experimental API :header-rows: 1 @@ -36,7 +37,11 @@ The following is a list of experimental interfaces, starting from API version - * - :cpp:type:`mfxExtRefListCtrl` - 2.6 - - 2.7 + - 2.8 + - Moved to production + * - :cpp:enumerator:`MFX_EXTBUFF_UNIVERSAL_REFLIST_CTRL` + - 2.6 + - 2.8 - Moved to production * - Extended enum for :cpp:member:`mfxExtDecodeErrorReport::ErrorTypes` - 2.6 @@ -54,4 +59,24 @@ The following is a list of experimental interfaces, starting from API version - 2.7 - - + * - :cpp:enumerator:`MFX_FOURCC_ABGR16F` FourCC definition + - 2.8 + - + - + * - :cpp:enumerator:`MFX_CONTENT_NOISY_VIDEO` ContentInfo definition + - 2.8 + - + - + * - Camera Processing API for RAW acceleration + - 2.8 + - + - + * - Hint to disable external video frames caching for GPU copy + - 2.8 + - + - + * - :cpp:member:`mfxExtMBQP::Pitch` + - 2.8 + - + - diff --git a/source/elements/oneVPL/source/VPL_change_log.rst b/source/elements/oneVPL/source/VPL_change_log.rst index 7eab2ab6f8..4f61526c00 100644 --- a/source/elements/oneVPL/source/VPL_change_log.rst +++ b/source/elements/oneVPL/source/VPL_change_log.rst @@ -12,6 +12,28 @@ This section describes the API evolution from version to version. :local: :depth: 1 +----------- +Version 2.8 +----------- + +New in this release: + +* Introduced :cpp:enumerator:`MFX_FOURCC_ABGR16F` FourCC for 16-bit float point (per channel) 4:4:4 ABGR format. +* Clarified the :cpp:member:`mfxExtMasteringDisplayColourVolume::DisplayPrimariesX`, :cpp:member:`mfxExtMasteringDisplayColourVolume::DisplayPrimariesY` for the video processing usage. +* Added :cpp:enumerator:`MFX_CONTENT_NOISY_VIDEO` in ContentInfo definition. +* Added Camera Processing API for Camera RAW data. +* Introduced hint to disable external video frames caching for GPU copy. +* Clarified usage of :cpp:member:`mfxExtMasteringDisplayColourVolume::InsertPayloadToggle` and + :cpp:member:`mfxExtContentLightLevelInfo::InsertPayloadToggle` during decode operations. +* Fixed multiple spelling errors. +* Experimental API: introduced :cpp:member:`mfxExtMBQP::Pitch` value for QP map defined in :cpp:struct:`mfxExtMBQP`. +* Clarified when :cpp:func:`MFXEnumImplementations` may be called for implementation capabilities query. +* Added table with filenames included in the dispatcher's search process. + +Bug Fixes: + +* Fixed :ref:`Experimental API table ` to note that :cpp:type:`mfxExtRefListCtrl` and :cpp:enumerator:`MFX_EXTBUFF_UNIVERSAL_REFLIST_CTRL` were moved to production in version 2.8. + ----------- Version 2.7 ----------- @@ -21,7 +43,7 @@ New in this release: * :cpp:member:`mfxExtVppAuxData::RepeatedFrame` flag is actual again and returned back from deprecation state. * Clarified GPUCopy control behavior. * Introduced MFX_FOURCC_XYUV FourCC for non-alpha packed 4:4:4 format. -* Notice added to the :cpp:member:`mfxFrameSurfaceInterface::OnComplete` to claify when +* Notice added to the :cpp:member:`mfxFrameSurfaceInterface::OnComplete` to clarify when library can call this callback. * New product names for platforms: @@ -111,7 +133,7 @@ Version 2.4 * Added QueryInterface function to mfxFrameSurfaceInterface. * Added AdaptiveRef and alias for ExtBrcAdaptiveLTR. * Added MFX_FOURCC_BGRP FourCC for Planar BGR format. -* Enviromental variables to control dispatcher's logger. +* Environmental variables to control dispatcher's logger. ----------- Version 2.3 diff --git a/source/elements/oneVPL/source/VPL_intel_media_sdk.rst b/source/elements/oneVPL/source/VPL_intel_media_sdk.rst index e1c47f203e..6c5c3e8534 100644 --- a/source/elements/oneVPL/source/VPL_intel_media_sdk.rst +++ b/source/elements/oneVPL/source/VPL_intel_media_sdk.rst @@ -80,7 +80,9 @@ included in oneVPL: - **User plugins architecture.** oneVPL enables robust video acceleration through API implementations of many different video processing frameworks. Support of - a SDK user plugin framework is obsolete. + a |msdk_full_name| user plugin framework is obsolete. |msdk_full_name| RAW acceleration (Camera API) + which is implemented as plugin is also obsolete, oneVPL enables RAW acceleration (Camera + API) through oneVPL runtime such as oneVPL GPU runtime. - **External buffer memory management.** A set of callback functions to replace internal memory allocation is obsolete. @@ -98,6 +100,17 @@ included in oneVPL: - **Surface Type Neutral Transcoding.** Opaque memory support is removed and replaced with internal memory allocation concept. +- **Raw Acceleration.** |msdk_full_name| RAW acceleration (Camera API) which is + implemented as plugin is obsolete, replaced by oneVPL and oneVPL runtime implementation. + OneVPL reused most of |msdk_full_name| Camera API, but oneVPL camera API is not backward + compatible with |msdk_full_name| camera API due to obsolete plugin mechanism in oneVPL + and a few difference between oneVPL and |msdk_full_name|. The major difference between oneVPL + and |msdk_full_name| are listed: + 1) mfxCamGammaParam and mfxExtCamGammaCorrection are removed in oneVPL; 2) Added + reserved bytes in mfxExtCamHotPixelRemoval, mfxCamVignetteCorrectionParam and + mfxCamVignetteCorrectionElement for future extension; 3) Changed CCM from mfxF64 + to mfxF32 in mfxExtCamColorCorrection3x3 and added more reserved bytes. + .. _deprecated-api: ----------------------------- @@ -191,6 +204,6 @@ simplification of existing applications migration to oneVPL: - mfxvideo++.h -.. important:: |msdk_full_name| obsolette API removed from those header files. +.. important:: |msdk_full_name| obsolete API removed from those header files. Code compiled with the oneVPL API headers will generate a compile and/or link error when attempting to use a removed API. diff --git a/source/elements/oneVPL/source/VPL_summary.rst b/source/elements/oneVPL/source/VPL_summary.rst index c65c8caf5f..fc90111bc5 100644 --- a/source/elements/oneVPL/source/VPL_summary.rst +++ b/source/elements/oneVPL/source/VPL_summary.rst @@ -16,9 +16,10 @@ filter, or any other underlying features are mandatory for the implementation. The oneVPL API is designed such that users have several options to discover capabilities exposed by the implementation: -#. Before session creation: Users can get a list of supported encoders, decoders, +#. Before or after session creation: Users can get a list of supported encoders, decoders, VPP filters, correspondent color formats, and memory types with the help of - the :cpp:func:`MFXEnumImplementations` function. + the :cpp:func:`MFXEnumImplementations` function. For more details, see + :ref:`oneVPL Dispatcher Interactions `. #. After session is created: Users can call **Query** functions to obtain low level implementation capabilities. @@ -189,7 +190,7 @@ All implementations must implement the APIs listed in the If the implementation exposes any encoder, decoder, or VPP filter, it must implement the corresponding mandatory APIs, as described in the :ref:`Mandatory Encode `, :ref:`Decode `, -:ref:`VPP ` abd :ref:`Decode+VPP ` APIs +:ref:`VPP ` and :ref:`Decode+VPP ` APIs tables: .. _mandatory-enc-apis-table: diff --git a/source/elements/oneVPL/source/architecture/index.rst b/source/elements/oneVPL/source/architecture/index.rst index 23ad3af151..6ea73c961d 100644 --- a/source/elements/oneVPL/source/architecture/index.rst +++ b/source/elements/oneVPL/source/architecture/index.rst @@ -20,7 +20,7 @@ oneVPL functions fall into the following categories: Functions that perform video processing on raw video frames DECODE_VPP - Functions that perfom combined operations of decoding and video processing + Functions that perform combined operations of decoding and video processing CORE Auxiliary functions for synchronization diff --git a/source/elements/oneVPL/source/conf.py b/source/elements/oneVPL/source/conf.py index c228d0e067..bac4b4bdd8 100644 --- a/source/elements/oneVPL/source/conf.py +++ b/source/elements/oneVPL/source/conf.py @@ -30,3 +30,5 @@ cpp_id_attributes = ['MFX_CDECL', 'MFX_DEPRECATED'] c_id_attributes = ['MFX_CDECL', 'MFX_DEPRECATED'] + +spelling_word_list_filename=['../../../spelling_wordlist.txt','spelling_wordlist_vpl.txt'] diff --git a/source/elements/oneVPL/source/programming_guide/VPL_prg_decoding.rst b/source/elements/oneVPL/source/programming_guide/VPL_prg_decoding.rst index 9418f0574b..23ca0f98cb 100644 --- a/source/elements/oneVPL/source/programming_guide/VPL_prg_decoding.rst +++ b/source/elements/oneVPL/source/programming_guide/VPL_prg_decoding.rst @@ -382,7 +382,7 @@ memory allocation model and returns array of processed frames through :end-before: /*end1*/ :lineno-start: 1 -It's possible that different video processing channels may have diffrent +It's possible that different video processing channels may have different latency: .. literalinclude:: ../snippets/prg_decoding_vpp.c diff --git a/source/elements/oneVPL/source/programming_guide/VPL_prg_session.rst b/source/elements/oneVPL/source/programming_guide/VPL_prg_session.rst index ac50269ed0..89a4dd54bb 100644 --- a/source/elements/oneVPL/source/programming_guide/VPL_prg_session.rst +++ b/source/elements/oneVPL/source/programming_guide/VPL_prg_session.rst @@ -28,8 +28,9 @@ session. To avoid memory leaks, always call :cpp:func:`MFXClose` after .. important:: For backward compatibility with existent |msdk_full_name| applications oneVPL session can be created and initialized by - the legacy dispacther through :cpp:func:`MFXInit` or - :cpp:func:`MFXInitEx` calls. + the legacy dispatcher through :cpp:func:`MFXInit` or + :cpp:func:`MFXInitEx` calls. In this case, the reported API version + will be 1.255 on |intel_r| platforms with X\ :sup:`e` architecture. The application can initialize a session as a software-based session (:cpp:enumerator:`MFX_IMPL_SOFTWARE`) or a hardware-based session @@ -162,15 +163,15 @@ will vary according to the OS. * On Windows, the dispatcher searches the following locations, in the specified order, to find the correct implementation library: - #. The :file:`Driver Store` directory for all avialable adapters. + #. The :file:`Driver Store` directory for all available adapters. All types of graphics drivers can install libraries in this directory. `Learn more about Driver Store `__. Applicable only for Intel implementations. #. The directory of the exe file of the current process. #. Current working directory. - #. `PATH` enviromental variable. + #. `PATH` environmental variable. #. For backward compatibility with older spec versions, dispatcher also checks user-defined search folders which are provided by `ONEVPL_SEARCH_PATH` - enviromental variable. + environmental variable. * On Linux, the dispatcher searches the following locations, in the specified order, to find the correct implementation library: @@ -181,7 +182,7 @@ will vary according to the OS. #. Current working directory. #. For backward compatibility with older spec versions, dispatcher also checks user-defined search folders which are provided by `ONEVPL_SEARCH_PATH` - enviromental variable. + environmental variable. .. important:: To prioritize loading of custom oneVPL library, users may set environment variable `ONEVPL_PRIORITY_PATH` with the path to the user-defined folder. @@ -200,8 +201,17 @@ implementation. Internally, the dispatcher works as follows: -#. Dispatcher loads any shared library with `libvpl*` prefix in the library name - in the given search folders. +#. Dispatcher loads all shared libraries in the given search folders, whose names + match any of the patterns in the following table: + + ================== ================== ================= ========================================= + Windows 64-bit Windows 32-bit Linux 64-bit Description + ================== ================== ================= ========================================= + libvpl\*.dll libvpl\*.dll libvpl\*.so\* Runtime library for any platform + libmfx64-gen.dll libmfx32-gen.dll libmfx-gen.so.1.2 Runtime library for oneVPL for |intel_r| platforms with X\ :sup:`e` architecture + libmfxhw64.dll libmfxhw32.dll libmfxhw64.so.1 Runtime library for |msdk_full_name| + ================== ================== ================= ========================================= + #. For each loaded library, the dispatcher tries to resolve address of the :cpp:func:`MFXQueryImplsDescription` function to collect the implementation's capabilities. @@ -232,7 +242,7 @@ left to right from column to column and concatenate strings by using `.` (dot) a | | | .Impl | | | | +----------------------------+----------------------+---------------------------+ | | | mfxImplDescription | MFX_VARIANT_TYPE_U32 | The mode will be used for | - | | | .AccelerationMode | | session initilization | + | | | .AccelerationMode | | session initialization | | +----------------------------+----------------------+---------------------------+ | | | mfxImplDescription | MFX_VARIANT_TYPE_U32 | | | | | .ApiVersion | | | @@ -467,12 +477,14 @@ influence on the implementation selection. They are used during the - Pointer to the extension buffer - :cpp:enumerator:`mfxVariantType::MFX_VARIANT_TYPE_PTR` +.. _onevpl-dispatcher-interactions: + ------------------------------ oneVPL Dispatcher Interactions ------------------------------ -This sequence diagram visualize how application communcates with implementations -via the dispacher. +This sequence diagram visualize how application communicates with implementations +via the dispatcher. Dispatcher API This API is implemented in the dispatcher. @@ -506,6 +518,11 @@ Implementation API A -> D: MFXSetConfigProperty() A -> D: MFXEnumImplementations() + note right of A + MFXEnumImplementations() may also be called + after MFXCreateSession(). + end note + Activate I1 D -> I1: MFXQueryImplsDescription() @@ -589,7 +606,7 @@ Implementation API deactivate D @enduml -The oneVPL dispacther is capable to load and initialize |msdk_full_name| legacy +The oneVPL dispatcher is capable to load and initialize |msdk_full_name| legacy library. The sequence diagram below demonstrates the approach. .. uml:: @@ -642,7 +659,7 @@ library. The sequence diagram below demonstrates the approach. deactivate D @enduml -.. important:: The dispacther doesn't filter and report +.. important:: The dispatcher doesn't filter and report :cpp:struct:`mfxDeviceDescription`, :cpp:struct:`mfxDecoderDescription`, :cpp:struct:`mfxEncoderDescription`, @@ -663,10 +680,10 @@ To redirect log output to the desired file, set the `ONEVPL_DISPATCHER_LOG_FILE` environmental variable with the file name of the log file. ------------------------------ -Examples of Dispathcer's Usage +Examples of Dispatcher's Usage ------------------------------ -This code illustrates simple usage of dispathcer to load first available +This code illustrates simple usage of dispatcher to load first available library: .. literalinclude:: ../snippets/prg_disp.c @@ -675,7 +692,7 @@ library: :end-before: /*end1*/ :lineno-start: 1 -This code illustrates simple usage of dispathcer to load first available HW +This code illustrates simple usage of dispatcher to load first available HW accelerated library: .. literalinclude:: ../snippets/prg_disp.c @@ -751,7 +768,7 @@ How To Search For The Available VPP Filter implementation Each VPP filter identified by the filter ID. Filter ID is defined by corresponding to the filter extension buffer ID value which is defined in a form -of fourCC value. +of FourCC value. Filter ID values are subset of the general :ref:`ExtendedBufferID ` enum. The :ref:`table ` references available IDs of VPP filters to search. Application needs to assign this value to the field of @@ -811,7 +828,7 @@ Sessions can be created from different implementations, each implementations can be located in different shared libraries. To get path of the shared library with the implementation from which session can be or was created, application can use :cpp:func:`MFXEnumImplementations` and pass :cpp:enumerator:`MFX_IMPLCAPS_IMPLPATH` -value as the outpt data request. +value as the output data request. This code illustrates collection and print out path of implementations's shared library: @@ -828,7 +845,7 @@ shared library: oneVPL implementation on |intel_r| platforms with X\ :sup:`e` architecture and |msdk_full_name| Coexistence ----------------------------------------------------------------------------------------------------------- -oneVPL supersedes |msdk_full_name| and partially binary compartible with +oneVPL supersedes |msdk_full_name| and is partially binary compatible with |msdk_full_name|. Both oneVPL and |msdk_full_name| includes own dispatcher and implementation. Coexistence of oneVPL and |msdk_full_name| dispatchers and implementations on single system is allowed until |msdk_full_name| is not EOL. diff --git a/source/elements/oneVPL/source/programming_guide/VPL_prg_vpp.rst b/source/elements/oneVPL/source/programming_guide/VPL_prg_vpp.rst index 60c3584bd6..32d47c9a99 100644 --- a/source/elements/oneVPL/source/programming_guide/VPL_prg_vpp.rst +++ b/source/elements/oneVPL/source/programming_guide/VPL_prg_vpp.rst @@ -259,3 +259,20 @@ The following pseudo code shows HDR to HDR. :start-after: /*beg8*/ :end-before: /*end8*/ :lineno-start: 1 + +----------------------- +Camera RAW acceleration +----------------------- + +oneVPL supports camera raw format processing with Intel HW. The following pseudo code +shows how to perform camera raw hardware acceleration. For pipeline processing initialization, +the application needs to attach the camera structures to the :cpp:struct:`mfxVideoParam` structure +and call the :cpp:func:`MFXVideoVPP_Init` function. + +The following pseudo code shows camera raw processing. + +.. literalinclude:: ../snippets/prg_vpp.c + :language: c++ + :start-after: /*beg9*/ + :end-before: /*end9*/ + :lineno-start: 1 \ No newline at end of file diff --git a/source/elements/oneVPL/source/snippets/prg_decoding_vpp.c b/source/elements/oneVPL/source/snippets/prg_decoding_vpp.c index b722f8743a..56739af4d2 100644 --- a/source/elements/oneVPL/source/snippets/prg_decoding_vpp.c +++ b/source/elements/oneVPL/source/snippets/prg_decoding_vpp.c @@ -53,7 +53,7 @@ static void prg_decoding_vpp2 () { sts = MFXVideoDECODE_VPP_DecodeFrameAsync(session, bitstream, NULL, 0, &surf_array_out); //surf_array_out layout is do_smth(surf_array_out->Surfaces[0]); //decoded frame -do_smth(surf_array_out->Surfaces[1]); //resized frame (ChannelId = 1). The first frame from channel with resize avialable +do_smth(surf_array_out->Surfaces[1]); //resized frame (ChannelId = 1). The first frame from channel with resize available // no output from channel with ADI output since it has one frame delay //2nd call diff --git a/source/elements/oneVPL/source/snippets/prg_session.cpp b/source/elements/oneVPL/source/snippets/prg_session.cpp index 87e70ae16e..565a38ff2e 100644 --- a/source/elements/oneVPL/source/snippets/prg_session.cpp +++ b/source/elements/oneVPL/source/snippets/prg_session.cpp @@ -116,9 +116,9 @@ mfxSession def_session; loader = mfxLoader(); -// Create session from the first avialable implementation. +// Create session from the first available implementation. // That's why we no any filters need to be set. -// First avialable implementation has index equal to the 0. +// First available implementation has index equal to the 0. MFXCreateSession(loader, 0, &def_session); // Get and print out OS path to the loaded shared library diff --git a/source/elements/oneVPL/source/snippets/prg_vpp.c b/source/elements/oneVPL/source/snippets/prg_vpp.c index b785e0c293..a414d458bc 100644 --- a/source/elements/oneVPL/source/snippets/prg_vpp.c +++ b/source/elements/oneVPL/source/snippets/prg_vpp.c @@ -13,6 +13,9 @@ #include "mfxdefs.h" #include "mfxvideo.h" #include "mfxmvc.h" +#ifdef ONEVPL_EXPERIMENTAL +#include "mfxcamera.h" +#endif /* These macro required for code compilation. */ #define INFINITE 0x7FFFFFFF @@ -362,3 +365,36 @@ MFXVideoVPP_Init(session, &VPPParams); /*end8*/ } + +static void prg_vpp9() { +/*beg9*/ +#ifdef ONEVPL_EXPERIMENTAL +// Camera Raw Format +mfxExtCamPipeControl pipeControl = {}; +pipeControl.Header.BufferId = MFX_EXTBUF_CAM_PIPECONTROL; +pipeControl.Header.BufferSz = sizeof(mfxExtCamPipeControl); +pipeControl.RawFormat = (mfxU16)MFX_CAM_BAYER_BGGR; + +// Black level correction +mfxExtCamBlackLevelCorrection blackLevelCorrection = {}; +blackLevelCorrection.Header.BufferId = MFX_EXTBUF_CAM_BLACK_LEVEL_CORRECTION; +blackLevelCorrection.Header.BufferSz = sizeof(mfxExtCamBlackLevelCorrection); +mfxU16 black_level_B = 16, black_level_G0 = 16, black_level_G1 = 16, black_level_R = 16; +// Initialize the value for black level B, G0, G1, R as needed +blackLevelCorrection.B = black_level_B; +blackLevelCorrection.G0 = black_level_G0; +blackLevelCorrection.G1 = black_level_G1; +blackLevelCorrection.R = black_level_R; + +mfxExtBuffer *ExtBufferIn[2]; +ExtBufferIn[0] = (mfxExtBuffer *)&pipeControl; +ExtBufferIn[1] = (mfxExtBuffer *)&blackLevelCorrection; + +mfxSession session = (mfxSession)0; +mfxVideoParam VPPParams = {}; +VPPParams.NumExtParam = 2; +VPPParams.ExtParam = (mfxExtBuffer **)&ExtBufferIn[0]; +MFXVideoVPP_Init(session, &VPPParams); +#endif +/*end9*/ +} diff --git a/source/elements/oneVPL/source/spelling_wordlist_vpl.txt b/source/elements/oneVPL/source/spelling_wordlist_vpl.txt new file mode 100644 index 0000000000..efd575e84e --- /dev/null +++ b/source/elements/oneVPL/source/spelling_wordlist_vpl.txt @@ -0,0 +1,312 @@ +# SPDX-FileCopyrightText: 2019-2020 Intel Corporation +# +# SPDX-License-Identifier: MIT + +# additional entries for oneVPL +AllocationPolicy +altref +BitDepthChroma +BitDepthLuma +Bitfield +bitrates +BitstreamParam +cbr +ChannelId +ChromaFormat +CodecProfile +CodingOption +cpb +cpp +CropH +CropW +CropX +CropXYWH +CropY +ctrl +de +decmemdesc +decprofile +deinitializes +DeltaQP +dec +dev +disjoined +DLut +DLutChannelMapping +DLutEntry +DLutMemoryLayout +DLutSystemBuffer +DLutVideoBuffer +doesn +Downscaling +dri +FeatureEnabled +FFFFFFF +FilmGrainParam +FilmGrainPoint +FLink +FrameInfo +FrameInterface +FrameOrder +FRC +FunctionsName +gapping +GeneralConstraintFlags +hdl +hrd +hw +idesc +IDR +Ign +Impl +impls +itu +Kbps +Keem +ld +letterboxing +libmfx +libmfxhw +libmfxsw +libvpl +MemHandleType +mfx +mfxAccelerationMode +mfxAccelerationModeDescription +mfxAdapterInfo +mfxAdaptersInfo +mfxAV +mfxBitstream +mfxBRCFrameCtrl +mfxBRCFrameParam +mfxBRCFrameStatus +mfxCam +mfxCamBayerFormat +mfxCamFwdGammaSegment +mfxCamGammaParam +mfxCamVignetteCorrectionElement +mfxCamVignetteCorrectionParam +mfxCamWhiteBalanceMode +mfxChannel +mfxChar +mfxComponentInfo +mfxComponentType +mfxCreateSession +mfxCTUHeader +mfxCTUInfo +mfxCUInfo +mfxDataType +mfxDecodeStat +mfxDenoiseMode +mfxDeviceDescription +mfxEncodeBlkStats +mfxEncodeBlkStatsMemLayout +mfxEncodeCtrl +mfxEncodedUnitInfo +mfxEncodedUnitsInfo +mfxEncodeFrameStats +mfxEncodeHighLevelStats +mfxEncodeSliceStats +mfxEncodeStat +mfxencodestats +mfxEncodeStatsContainer +mfxEncodeStatsMode +mfxEncodeTileStats +mfxExtAllocationHints +mfxExtAV +mfxExtAVCEncodedFrameInfo +mfxExtAVCRefListCtrl +mfxExtAVCRefLists +mfxExtAVCRoundingOffset +mfxExtAvcTemporalLayers +mfxExtBRC +mfxExtBuffer +mfxExtCam +mfxExtCamBayerDenoise +mfxExtCamBlackLevelCorrection +mfxExtCamColorCorrection +mfxExtCamCscYuvRgb +mfxExtCamFwdGamma +mfxExtCamGammaCorrection +mfxExtCamHotPixelRemoval +mfxExtCamLensGeomDistCorrection +mfxExtCamPadding +mfxExtCamPipeControl +mfxExtCamTotalColorControl +mfxExtCamVignetteCorrection +mfxExtCamWhiteBalance +mfxExtCencParam +mfxExtChromaLocInfo +mfxExtCodingOption +mfxExtCodingOptionSPSPPS +mfxExtCodingOptionVPS +mfxExtColorConversion +mfxExtContentLightLevelInfo +mfxExtDecodedFrameInfo +mfxExtDecodeErrorReport +mfxExtDecVideoProcessing +mfxExtDeviceAffinityMask +mfxExtDirtyRect +mfxExtEncodedSlicesInfo +mfxExtEncodedUnitsInfo +mfxExtEncoderCapability +mfxExtEncoderIPCMArea +mfxExtEncoderResetOption +mfxExtEncoderROI +mfxExtEncodeStats +mfxExtEncodeStatsOutput +mfxExtendedDeviceId +mfxExtHEVCParam +mfxExtHEVCRefListCtrl +mfxExtHEVCRefLists +mfxExtHEVCRegion +mfxExtHEVCTemporalLayers +mfxExtHEVCTiles +mfxExtHyperModeParam +mfxExtInCrops +mfxExtInsertHeaders +mfxExtJPEGHuffmanTables +mfxExtJPEGQuantTables +mfxExtMasteringDisplayColourVolume +mfxExtMBDisableSkipMap +mfxExtMBForceIntra +mfxExtMBQP +mfxExtMoveRect +mfxExtMVCSeqDesc +mfxExtMVCTargetViews +mfxExtMVOverPicBoundaries +mfxExtPartialBitstreamParam +mfxExtPictureTimingSEI +mfxExtPredWeightTable +mfxExtRefListCtrl +mfxExtTemporalLayers +mfxExtThreadsParam +mfxExtTimeCode +mfxExtVideoSignalInfo +mfxExtVP +mfxExtVPP +mfxExtVppAuxData +mfxExtVPPColorFill +mfxExtVPPComposite +mfxExtVPPDeinterlacing +mfxExtVPPDenoise +mfxExtVPPDetail +mfxExtVPPDoNotUse +mfxExtVPPDoUse +mfxExtVPPFieldProcessing +mfxExtVPPFrameRateConversion +mfxExtVPPImageStab +mfxExtVppMctf +mfxExtVPPMirroring +mfxExtVPPProcAmp +mfxExtVPPRotation +mfxExtVPPScaling +mfxExtVPPVideoSignalInfo +mfxF +mfxFP +mfxFrameAllocator +mfxFrameAllocRequest +mfxFrameAllocResponse +mfxFrameData +mfxFrameId +mfxFrameInfo +mfxFrameSurfaceInterface +mfxGUID +mfxHandleType +mfxHDL +mfxHDLPair +mfxHyperMode +mfxI +mfxImplDescription +mfxImplementedFunctions +mfxInfoMFX +mfxInfoVPP +mfxInitializationParam +mfxInitParam +mfxMBInfo +mfxMediaAdapterType +mfxMemoryFlags +mfxMVCOperationPoint +mfxMVCViewDependency +mfxPayload +mfxPlatform +mfxPoolAllocationPolicy +mfxPoolPolicyDescription +mfxPriority +mfxQPandMode +mfxRange +mfxRect +mfxRefInterface +mfxResourceType +mfxSkipMode +mfxStatus +mfxStructVersion +mfxSurfaceArray +mfxSurfacePoolInterface +mfxTemporalLayer +mfxU +mfxUnload +mfxVariant +mfxVariantType +mfxVersion +mfxvideo +mfxVideoChannelParam +mfxVideoParam +mfxVP +mfxVPPCompInputStream +mfxVPPDescription +mfxVPPPoolType +mfxVPPStat +missprint +multiref +NAL +nLx +nRepack +nRx +NumBit +NumUnitsEncoded +Nx +NxN +NxnB +NxnT +OR'ed +piecewise +pred +Qm +QP +quantizer +Quantizer +rect +refcountable +ReferenceFrame +RenderD +ResolutionParam +sao +Scaler +SegmentIdBlockSize +SegmentParam +sei +SkipFrame +structs +subblock +subblocks +TargetUsage +TemporalLayer +TemporalLayers +TileParam +tri +Typedefs +utf +vaCreateSurfaces +vaDestroySurfaces +vaMapBuffer +vaQuerySurfaceStatus +vaSyncSurface +verifier +ViewId +vpp +Wayland +xFFFF +xFFFFFFFF +xN +