diff --git a/.github/actions/libmfx/include/mfx/mfxadapter.h b/.github/actions/libmfx/include/mfx/mfxadapter.h deleted file mode 100644 index 6e97565..0000000 --- a/.github/actions/libmfx/include/mfx/mfxadapter.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2019-2020 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#include "mfxdefs.h" -#if (MFX_VERSION >= 1031) -#ifndef __MFXADAPTER_H__ -#define __MFXADAPTER_H__ - -#include "mfxstructures.h" - -#ifdef __cplusplus -extern "C" -{ -#endif -mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersInfo* adapters); -mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec_id, mfxAdaptersInfo* adapters); -mfxStatus MFX_CDECL MFXQueryAdaptersNumber(mfxU32* num_adapters); -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // __MFXADAPTER_H__ -#endif \ No newline at end of file diff --git a/.github/actions/libmfx/include/mfx/mfxastructures.h b/.github/actions/libmfx/include/mfx/mfxastructures.h deleted file mode 100644 index 69bc560..0000000 --- a/.github/actions/libmfx/include/mfx/mfxastructures.h +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) 2017-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXASTRUCTURES_H__ -#define __MFXASTRUCTURES_H__ -#include "mfxcommon.h" - -#if !defined (__GNUC__) -#pragma warning(disable: 4201) -#endif - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* CodecId */ -enum { - MFX_CODEC_AAC =MFX_MAKEFOURCC('A','A','C',' '), - MFX_CODEC_MP3 =MFX_MAKEFOURCC('M','P','3',' ') -}; - -enum { - /* AAC Profiles & Levels */ - MFX_PROFILE_AAC_LC =2, - MFX_PROFILE_AAC_LTP =4, - MFX_PROFILE_AAC_MAIN =1, - MFX_PROFILE_AAC_SSR =3, - MFX_PROFILE_AAC_HE =5, - MFX_PROFILE_AAC_ALS =0x20, - MFX_PROFILE_AAC_BSAC =22, - MFX_PROFILE_AAC_PS =29, - - /*MPEG AUDIO*/ - MFX_AUDIO_MPEG1_LAYER1 =0x00000110, - MFX_AUDIO_MPEG1_LAYER2 =0x00000120, - MFX_AUDIO_MPEG1_LAYER3 =0x00000140, - MFX_AUDIO_MPEG2_LAYER1 =0x00000210, - MFX_AUDIO_MPEG2_LAYER2 =0x00000220, - MFX_AUDIO_MPEG2_LAYER3 =0x00000240 -}; - -/*AAC HE decoder down sampling*/ -enum { - MFX_AUDIO_AAC_HE_DWNSMPL_OFF=0, - MFX_AUDIO_AAC_HE_DWNSMPL_ON= 1 -}; - -/* AAC decoder support of PS */ -enum { - MFX_AUDIO_AAC_PS_DISABLE= 0, - MFX_AUDIO_AAC_PS_PARSER= 1, - MFX_AUDIO_AAC_PS_ENABLE_BL= 111, - MFX_AUDIO_AAC_PS_ENABLE_UR= 411 -}; - -/*AAC decoder SBR support*/ -enum { - MFX_AUDIO_AAC_SBR_DISABLE = 0, - MFX_AUDIO_AAC_SBR_ENABLE= 1, - MFX_AUDIO_AAC_SBR_UNDEF= 2 -}; - -/*AAC header type*/ -enum{ - MFX_AUDIO_AAC_ADTS= 1, - MFX_AUDIO_AAC_ADIF= 2, - MFX_AUDIO_AAC_RAW= 3, -}; - -/*AAC encoder stereo mode*/ -enum -{ - MFX_AUDIO_AAC_MONO= 0, - MFX_AUDIO_AAC_LR_STEREO= 1, - MFX_AUDIO_AAC_MS_STEREO= 2, - MFX_AUDIO_AAC_JOINT_STEREO= 3 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU32 CodecId; - mfxU16 CodecProfile; - mfxU16 CodecLevel; - - mfxU32 Bitrate; - mfxU32 SampleFrequency; - mfxU16 NumChannel; - mfxU16 BitPerSample; - - mfxU16 reserved1[22]; - - union { - struct { /* AAC Decoding Options */ - mfxU16 FlagPSSupportLev; - mfxU16 Layer; - mfxU16 AACHeaderDataSize; - mfxU8 AACHeaderData[64]; - }; - struct { /* AAC Encoding Options */ - mfxU16 OutputFormat; - mfxU16 StereoMode; - mfxU16 reserved2[61]; - }; - }; -} mfxAudioInfoMFX; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxU16 AsyncDepth; - mfxU16 Protected; - mfxU16 reserved[14]; - - mfxAudioInfoMFX mfx; - mfxExtBuffer** ExtParam; - mfxU16 NumExtParam; -} mfxAudioParam; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU32 SuggestedInputSize; - mfxU32 SuggestedOutputSize; - mfxU32 reserved[6]; -} mfxAudioAllocRequest; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxU64 TimeStamp; /* 1/90KHz */ - mfxU16 Locked; - mfxU16 NumChannels; - mfxU32 SampleFrequency; - mfxU16 BitPerSample; - mfxU16 reserved1[7]; - - mfxU8* Data; - mfxU32 reserved2; - mfxU32 DataLength; - mfxU32 MaxLength; - - mfxU32 NumExtParam; - mfxExtBuffer **ExtParam; -} mfxAudioFrame; -MFX_PACK_END() - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - - diff --git a/.github/actions/libmfx/include/mfx/mfxaudio++.h b/.github/actions/libmfx/include/mfx/mfxaudio++.h deleted file mode 100644 index 7b8e36f..0000000 --- a/.github/actions/libmfx/include/mfx/mfxaudio++.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2017 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXAUDIOPLUSPLUS_H -#define __MFXAUDIOPLUSPLUS_H - -#include "mfxaudio.h" - -class MFXAudioSession -{ -public: - MFXAudioSession(void) { m_session = (mfxSession) 0; } - virtual ~MFXAudioSession(void) { Close(); } - - virtual mfxStatus Init(mfxIMPL impl, mfxVersion *ver) { return MFXInit(impl, ver, &m_session); } - virtual mfxStatus Close(void) - { - mfxStatus mfxRes; - mfxRes = MFXClose(m_session); m_session = (mfxSession) 0; - return mfxRes; - } - - virtual mfxStatus QueryIMPL(mfxIMPL *impl) { return MFXQueryIMPL(m_session, impl); } - virtual mfxStatus QueryVersion(mfxVersion *version) { return MFXQueryVersion(m_session, version); } - - virtual mfxStatus JoinSession(mfxSession child_session) { return MFXJoinSession(m_session, child_session);} - virtual mfxStatus DisjoinSession( ) { return MFXDisjoinSession(m_session);} - virtual mfxStatus CloneSession( mfxSession *clone) { return MFXCloneSession(m_session, clone);} - virtual mfxStatus SetPriority( mfxPriority priority) { return MFXSetPriority(m_session, priority);} - virtual mfxStatus GetPriority( mfxPriority *priority) { return MFXGetPriority(m_session, priority);} - - virtual mfxStatus SyncOperation(mfxSyncPoint syncp, mfxU32 wait) { return MFXAudioCORE_SyncOperation(m_session, syncp, wait); } - - virtual operator mfxSession (void) { return m_session; } - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -}; - - -class MFXAudioDECODE -{ -public: - - MFXAudioDECODE(mfxSession session) { m_session = session; } - virtual ~MFXAudioDECODE(void) { Close(); } - - virtual mfxStatus Query(mfxAudioParam *in, mfxAudioParam *out) { return MFXAudioDECODE_Query(m_session, in, out); } - virtual mfxStatus DecodeHeader(mfxBitstream *bs, mfxAudioParam *par) { return MFXAudioDECODE_DecodeHeader(m_session, bs, par); } - virtual mfxStatus QueryIOSize(mfxAudioParam *par, mfxAudioAllocRequest *request) { return MFXAudioDECODE_QueryIOSize(m_session, par, request); } - virtual mfxStatus Init(mfxAudioParam *par) { return MFXAudioDECODE_Init(m_session, par); } - virtual mfxStatus Reset(mfxAudioParam *par) { return MFXAudioDECODE_Reset(m_session, par); } - virtual mfxStatus Close(void) { return MFXAudioDECODE_Close(m_session); } - virtual mfxStatus GetAudioParam(mfxAudioParam *par) { return MFXAudioDECODE_GetAudioParam(m_session, par); } - virtual mfxStatus DecodeFrameAsync(mfxBitstream *bs, mfxAudioFrame *frame, mfxSyncPoint *syncp) { return MFXAudioDECODE_DecodeFrameAsync(m_session, bs, frame, syncp); } - - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -}; - - -class MFXAudioENCODE -{ -public: - - MFXAudioENCODE(mfxSession session) { m_session = session; } - virtual ~MFXAudioENCODE(void) { Close(); } - - virtual mfxStatus Query(mfxAudioParam *in, mfxAudioParam *out) { return MFXAudioENCODE_Query(m_session, in, out); } - virtual mfxStatus QueryIOSize(mfxAudioParam *par, mfxAudioAllocRequest *request) { return MFXAudioENCODE_QueryIOSize(m_session, par, request); } - virtual mfxStatus Init(mfxAudioParam *par) { return MFXAudioENCODE_Init(m_session, par); } - virtual mfxStatus Reset(mfxAudioParam *par) { return MFXAudioENCODE_Reset(m_session, par); } - virtual mfxStatus Close(void) { return MFXAudioENCODE_Close(m_session); } - virtual mfxStatus GetAudioParam(mfxAudioParam *par) { return MFXAudioENCODE_GetAudioParam(m_session, par); } - virtual mfxStatus EncodeFrameAsync(mfxAudioFrame *frame, mfxBitstream *buffer_out, mfxSyncPoint *syncp) { return MFXAudioENCODE_EncodeFrameAsync(m_session, frame, buffer_out, syncp); } - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -}; - -#endif \ No newline at end of file diff --git a/.github/actions/libmfx/include/mfx/mfxaudio.h b/.github/actions/libmfx/include/mfx/mfxaudio.h deleted file mode 100644 index 45478bd..0000000 --- a/.github/actions/libmfx/include/mfx/mfxaudio.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2017 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#ifndef __MFXAUDIO_H__ -#define __MFXAUDIO_H__ -#include "mfxsession.h" -#include "mfxastructures.h" - -#define MFX_AUDIO_VERSION_MAJOR 1 -#define MFX_AUDIO_VERSION_MINOR 15 - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* AudioCORE */ -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioCORE_SyncOperation(mfxSession session, mfxSyncPoint syncp, mfxU32 wait); - -/* AudioENCODE */ -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_Query(mfxSession session, mfxAudioParam *in, mfxAudioParam *out); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_QueryIOSize(mfxSession session, mfxAudioParam *par, mfxAudioAllocRequest *request); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_Init(mfxSession session, mfxAudioParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_Reset(mfxSession session, mfxAudioParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_Close(mfxSession session); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_GetAudioParam(mfxSession session, mfxAudioParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_EncodeFrameAsync(mfxSession session, mfxAudioFrame *frame, mfxBitstream *bs, mfxSyncPoint *syncp); - -/* AudioDECODE */ -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_Query(mfxSession session, mfxAudioParam *in, mfxAudioParam *out); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_DecodeHeader(mfxSession session, mfxBitstream *bs, mfxAudioParam* par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_Init(mfxSession session, mfxAudioParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_Reset(mfxSession session, mfxAudioParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_Close(mfxSession session); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_QueryIOSize(mfxSession session, mfxAudioParam *par, mfxAudioAllocRequest *request); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_GetAudioParam(mfxSession session, mfxAudioParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_DecodeFrameAsync(mfxSession session, mfxBitstream *bs, mfxAudioFrame *frame, mfxSyncPoint *syncp); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/.github/actions/libmfx/include/mfx/mfxbrc.h b/.github/actions/libmfx/include/mfx/mfxbrc.h deleted file mode 100644 index 0227579..0000000 --- a/.github/actions/libmfx/include/mfx/mfxbrc.h +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2019-2020 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXBRC_H__ -#define __MFXBRC_H__ - -#include "mfxvstructures.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Extended Buffer Ids */ -enum { - MFX_EXTBUFF_BRC = MFX_MAKEFOURCC('E','B','R','C') -}; - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { -#if (MFX_VERSION >= 1026) - mfxU32 reserved[23]; - mfxU16 SceneChange; // Frame is Scene Chg frame - mfxU16 LongTerm; // Frame is long term refrence - mfxU32 FrameCmplx; // Frame Complexity -#else - mfxU32 reserved[25]; -#endif - mfxU32 EncodedOrder; // Frame number in a sequence of reordered frames starting from encoder Init() - mfxU32 DisplayOrder; // Frame number in a sequence of frames in display order starting from last IDR - mfxU32 CodedFrameSize; // Size of frame in bytes after encoding - mfxU16 FrameType; // See FrameType enumerator - mfxU16 PyramidLayer; // B-pyramid or P-pyramid layer, frame belongs to - mfxU16 NumRecode; // Number of recodings performed for this frame - mfxU16 NumExtParam; - mfxExtBuffer** ExtParam; -} mfxBRCFrameParam; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxI32 QpY; // Frame-level Luma QP -#if (MFX_VERSION >= 1029) - mfxU32 InitialCpbRemovalDelay; - mfxU32 InitialCpbRemovalOffset; - mfxU32 reserved1[7]; - mfxU32 MaxFrameSize; // Max frame size in bytes (used for rePak) - mfxU8 DeltaQP[8]; // deltaQP[i] is adding to QP value while i-rePak - mfxU16 MaxNumRepak; // Max number of rePak to provide MaxFrameSize (from 0 to 8) - mfxU16 NumExtParam; - mfxExtBuffer** ExtParam; // extension buffer list -#else - mfxU32 reserved1[13]; - mfxHDL reserved2; -#endif -} mfxBRCFrameCtrl; -MFX_PACK_END() - -/* BRCStatus */ -enum { - MFX_BRC_OK = 0, // CodedFrameSize is acceptable, no further recoding/padding/skip required - MFX_BRC_BIG_FRAME = 1, // Coded frame is too big, recoding required - MFX_BRC_SMALL_FRAME = 2, // Coded frame is too small, recoding required - MFX_BRC_PANIC_BIG_FRAME = 3, // Coded frame is too big, no further recoding possible - skip frame - MFX_BRC_PANIC_SMALL_FRAME = 4 // Coded frame is too small, no further recoding possible - required padding to MinFrameSize -}; - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxU32 MinFrameSize; // Size in bytes, coded frame must be padded to when Status = MFX_BRC_PANIC_SMALL_FRAME - mfxU16 BRCStatus; // See BRCStatus enumerator - mfxU16 reserved[25]; - mfxHDL reserved1; -} mfxBRCFrameStatus; -MFX_PACK_END() - -/* Structure contains set of callbacks to perform external bit-rate control. -Can be attached to mfxVideoParam structure during encoder initialization. -Turn mfxExtCodingOption2::ExtBRC option ON to make encoder use external BRC instead of native one. */ -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; - - mfxU32 reserved[14]; - mfxHDL pthis; // Pointer to user-defined BRC instance. Will be passed to each mfxExtBRC callback. - - // Initialize BRC. Will be invoked during encoder Init(). In - pthis, par. - mfxStatus (MFX_CDECL *Init) (mfxHDL pthis, mfxVideoParam* par); - - // Reset BRC. Will be invoked during encoder Reset(). In - pthis, par. - mfxStatus (MFX_CDECL *Reset) (mfxHDL pthis, mfxVideoParam* par); - - // Close BRC. Will be invoked during encoder Close(). In - pthis. - mfxStatus (MFX_CDECL *Close) (mfxHDL pthis); - - // Obtain from BRC controls required for frame encoding. - // Will be invoked BEFORE encoding of each frame. In - pthis, par; Out - ctrl. - mfxStatus (MFX_CDECL *GetFrameCtrl) (mfxHDL pthis, mfxBRCFrameParam* par, mfxBRCFrameCtrl* ctrl); - - // Update BRC state and return command to continue/recode frame/do padding/skip frame. - // Will be invoked AFTER encoding of each frame. In - pthis, par, ctrl; Out - status. - mfxStatus (MFX_CDECL *Update) (mfxHDL pthis, mfxBRCFrameParam* par, mfxBRCFrameCtrl* ctrl, mfxBRCFrameStatus* status); - - mfxHDL reserved1[10]; -} mfxExtBRC; -MFX_PACK_END() - -#ifdef __cplusplus -} // extern "C" -#endif /* __cplusplus */ - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxcamera.h b/.github/actions/libmfx/include/mfx/mfxcamera.h deleted file mode 100644 index 085e9fe..0000000 --- a/.github/actions/libmfx/include/mfx/mfxcamera.h +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) 2018-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXCAMERA_H__ -#define __MFXCAMERA_H__ -#include "mfxcommon.h" - -#if !defined (__GNUC__) -#pragma warning(disable: 4201) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Camera Extended Buffer Ids */ -enum { - MFX_EXTBUF_CAM_GAMMA_CORRECTION = MFX_MAKEFOURCC('C','G','A','M'), - MFX_EXTBUF_CAM_WHITE_BALANCE = MFX_MAKEFOURCC('C','W','B','L'), - MFX_EXTBUF_CAM_HOT_PIXEL_REMOVAL = MFX_MAKEFOURCC('C','H','P','R'), - MFX_EXTBUF_CAM_BLACK_LEVEL_CORRECTION = MFX_MAKEFOURCC('C','B','L','C'), - MFX_EXTBUF_CAM_VIGNETTE_CORRECTION = MFX_MAKEFOURCC('C','V','G','T'), - MFX_EXTBUF_CAM_BAYER_DENOISE = MFX_MAKEFOURCC('C','D','N','S'), - MFX_EXTBUF_CAM_COLOR_CORRECTION_3X3 = MFX_MAKEFOURCC('C','C','3','3'), - MFX_EXTBUF_CAM_PADDING = MFX_MAKEFOURCC('C','P','A','D'), - MFX_EXTBUF_CAM_PIPECONTROL = MFX_MAKEFOURCC('C','P','P','C'), - MFX_EXTBUF_CAM_FORWARD_GAMMA_CORRECTION = MFX_MAKEFOURCC('C','F','G','C'), - MFX_EXTBUF_CAM_LENS_GEOM_DIST_CORRECTION = MFX_MAKEFOURCC('C','L','G','D'), - MFX_EXTBUF_CAM_3DLUT = MFX_MAKEFOURCC('C','L','U','T'), - MFX_EXTBUF_CAM_TOTAL_COLOR_CONTROL = MFX_MAKEFOURCC('C','T','C','C'), - MFX_EXTBUF_CAM_CSC_YUV_RGB = MFX_MAKEFOURCC('C','C','Y','R') -}; - -typedef enum { - MFX_CAM_GAMMA_VALUE = 0x0001, - MFX_CAM_GAMMA_LUT = 0x0002, -} mfxCamGammaParam; - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - mfxU16 Mode; - mfxU16 reserved1; - mfxF64 GammaValue; - - mfxU16 reserved2[3]; - mfxU16 NumPoints; - mfxU16 GammaPoint[1024]; - mfxU16 GammaCorrected[1024]; - mfxU32 reserved3[4]; -} mfxExtCamGammaCorrection; -MFX_PACK_END() - -typedef enum { - MFX_CAM_WHITE_BALANCE_MANUAL = 0x0001, - MFX_CAM_WHITE_BALANCE_AUTO = 0x0002 -} mfxCamWhiteBalanceMode; - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - mfxU32 Mode; - mfxF64 R; - mfxF64 G0; - mfxF64 B; - mfxF64 G1; - mfxU32 reserved[8]; -} mfxExtCamWhiteBalance; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 R; - mfxU16 G; - mfxU16 B; - mfxU16 C; - mfxU16 M; - mfxU16 Y; - mfxU16 reserved[6]; -} mfxExtCamTotalColorControl; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxF32 PreOffset[3]; - mfxF32 Matrix[3][3]; - mfxF32 PostOffset[3]; - mfxU16 reserved[30]; -} mfxExtCamCscYuvRgb; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 PixelThresholdDifference; - mfxU16 PixelCountThreshold; -} mfxExtCamHotPixelRemoval; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 R; - mfxU16 G0; - mfxU16 B; - mfxU16 G1; - mfxU32 reserved[4]; -} mfxExtCamBlackLevelCorrection; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU8 integer; - mfxU8 mantissa; -} mfxCamVignetteCorrectionElement; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxCamVignetteCorrectionElement R; - mfxCamVignetteCorrectionElement G0; - mfxCamVignetteCorrectionElement B; - mfxCamVignetteCorrectionElement G1; -} mfxCamVignetteCorrectionParam; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; - - mfxU32 Width; - mfxU32 Height; - mfxU32 Pitch; - mfxU32 reserved[7]; - - mfxCamVignetteCorrectionParam *CorrectionMap; - -} mfxExtCamVignetteCorrection; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 Threshold; - mfxU16 reserved[27]; -} mfxExtCamBayerDenoise; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - mfxF64 CCM[3][3]; - mfxU32 reserved[4]; -} mfxExtCamColorCorrection3x3; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 Top; - mfxU16 Bottom; - mfxU16 Left; - mfxU16 Right; - mfxU32 reserved[4]; -} mfxExtCamPadding; -MFX_PACK_END() - -typedef enum { - MFX_CAM_BAYER_BGGR = 0x0000, - MFX_CAM_BAYER_RGGB = 0x0001, - MFX_CAM_BAYER_GBRG = 0x0002, - MFX_CAM_BAYER_GRBG = 0x0003 -} mfxCamBayerFormat; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 RawFormat; - mfxU16 reserved1; - mfxU32 reserved[5]; -} mfxExtCamPipeControl; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct{ - mfxU16 Pixel; - mfxU16 Red; - mfxU16 Green; - mfxU16 Blue; -} mfxCamFwdGammaSegment; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - - mfxU16 reserved[19]; - mfxU16 NumSegments; - union { - mfxCamFwdGammaSegment* Segment; - mfxU64 reserved1; - }; -} mfxExtCamFwdGamma; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxF32 a[3]; // [R, G, B] - mfxF32 b[3]; // [R, G, B] - mfxF32 c[3]; // [R, G, B] - mfxF32 d[3]; // [R, G, B] - mfxU16 reserved[36]; -} mfxExtCamLensGeomDistCorrection; -MFX_PACK_END() - -/* LUTSize */ -enum { - MFX_CAM_3DLUT17_SIZE = (17 * 17 * 17), - MFX_CAM_3DLUT33_SIZE = (33 * 33 * 33), - MFX_CAM_3DLUT65_SIZE = (65 * 65 * 65) -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU16 R; - mfxU16 G; - mfxU16 B; - mfxU16 Reserved; -} mfxCam3DLutEntry; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - - mfxU16 reserved[10]; - mfxU32 Size; - union - { - mfxCam3DLutEntry* Table; - mfxU64 reserved1; - }; -} mfxExtCam3DLut; -MFX_PACK_END() - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // __MFXCAMERA_H__ diff --git a/.github/actions/libmfx/include/mfx/mfxcommon.h b/.github/actions/libmfx/include/mfx/mfxcommon.h deleted file mode 100644 index d65ca08..0000000 --- a/.github/actions/libmfx/include/mfx/mfxcommon.h +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) 2018-2020 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXCOMMON_H__ -#define __MFXCOMMON_H__ -#include "mfxdefs.h" - -#if !defined (__GNUC__) -#pragma warning(disable: 4201) -#endif - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#define MFX_MAKEFOURCC(A,B,C,D) ((((int)A))+(((int)B)<<8)+(((int)C)<<16)+(((int)D)<<24)) - -/* Extended Configuration Header Structure */ -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU32 BufferId; - mfxU32 BufferSz; -} mfxExtBuffer; -MFX_PACK_END() - -/* Library initialization and deinitialization */ -typedef mfxI32 mfxIMPL; -#define MFX_IMPL_BASETYPE(x) (0x00ff & (x)) - -enum { - MFX_IMPL_AUTO = 0x0000, /* Auto Selection/In or Not Supported/Out */ - MFX_IMPL_SOFTWARE = 0x0001, /* Pure Software Implementation */ - MFX_IMPL_HARDWARE = 0x0002, /* Hardware Accelerated Implementation (default device) */ - MFX_IMPL_AUTO_ANY = 0x0003, /* Auto selection of any hardware/software implementation */ - MFX_IMPL_HARDWARE_ANY = 0x0004, /* Auto selection of any hardware implementation */ - MFX_IMPL_HARDWARE2 = 0x0005, /* Hardware accelerated implementation (2nd device) */ - MFX_IMPL_HARDWARE3 = 0x0006, /* Hardware accelerated implementation (3rd device) */ - MFX_IMPL_HARDWARE4 = 0x0007, /* Hardware accelerated implementation (4th device) */ - MFX_IMPL_RUNTIME = 0x0008, -#if (MFX_VERSION >= MFX_VERSION_NEXT) - MFX_IMPL_SINGLE_THREAD= 0x0009, -#endif - MFX_IMPL_VIA_ANY = 0x0100, - MFX_IMPL_VIA_D3D9 = 0x0200, - MFX_IMPL_VIA_D3D11 = 0x0300, - MFX_IMPL_VIA_VAAPI = 0x0400, - - MFX_IMPL_AUDIO = 0x8000, -#if (MFX_VERSION >= MFX_VERSION_NEXT) - MFX_IMPL_EXTERNAL_THREADING = 0x10000, -#endif - - MFX_IMPL_UNSUPPORTED = 0x0000 /* One of the MFXQueryIMPL returns */ -}; - -/* Version Info */ -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef union { - struct { - mfxU16 Minor; - mfxU16 Major; - }; - mfxU32 Version; -} mfxVersion; -MFX_PACK_END() - -/* session priority */ -typedef enum -{ - MFX_PRIORITY_LOW = 0, - MFX_PRIORITY_NORMAL = 1, - MFX_PRIORITY_HIGH = 2 - -} mfxPriority; - -typedef struct _mfxEncryptedData mfxEncryptedData; -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - union { - struct { - mfxEncryptedData* EncryptedData; - mfxExtBuffer **ExtParam; - mfxU16 NumExtParam; - }; - mfxU32 reserved[6]; - }; - mfxI64 DecodeTimeStamp; - mfxU64 TimeStamp; - mfxU8* Data; - mfxU32 DataOffset; - mfxU32 DataLength; - mfxU32 MaxLength; - - mfxU16 PicStruct; - mfxU16 FrameType; - mfxU16 DataFlag; - mfxU16 reserved2; -} mfxBitstream; -MFX_PACK_END() - -typedef struct _mfxSyncPoint *mfxSyncPoint; - -/* GPUCopy */ -enum { - MFX_GPUCOPY_DEFAULT = 0, - MFX_GPUCOPY_ON = 1, - MFX_GPUCOPY_OFF = 2 -}; - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxIMPL Implementation; - mfxVersion Version; - mfxU16 ExternalThreads; - union { - struct { - mfxExtBuffer **ExtParam; - mfxU16 NumExtParam; - }; - mfxU16 reserved2[5]; - }; - mfxU16 GPUCopy; - mfxU16 reserved[21]; -} mfxInitParam; -MFX_PACK_END() - -enum { - MFX_EXTBUFF_THREADS_PARAM = MFX_MAKEFOURCC('T','H','D','P') -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 NumThread; - mfxI32 SchedulingType; - mfxI32 Priority; - mfxU16 reserved[55]; -} mfxExtThreadsParam; -MFX_PACK_END() - -/* PlatformCodeName */ -enum { - MFX_PLATFORM_UNKNOWN = 0, - MFX_PLATFORM_SANDYBRIDGE = 1, - MFX_PLATFORM_IVYBRIDGE = 2, - MFX_PLATFORM_HASWELL = 3, - MFX_PLATFORM_BAYTRAIL = 4, - MFX_PLATFORM_BROADWELL = 5, - MFX_PLATFORM_CHERRYTRAIL = 6, - MFX_PLATFORM_SKYLAKE = 7, - MFX_PLATFORM_APOLLOLAKE = 8, - MFX_PLATFORM_KABYLAKE = 9, -#if (MFX_VERSION >= 1025) - MFX_PLATFORM_GEMINILAKE = 10, - MFX_PLATFORM_COFFEELAKE = 11, - MFX_PLATFORM_CANNONLAKE = 20, -#endif -#if (MFX_VERSION >= 1027) - MFX_PLATFORM_ICELAKE = 30, -#endif - MFX_PLATFORM_JASPERLAKE = 32, - MFX_PLATFORM_ELKHARTLAKE = 33, - MFX_PLATFORM_TIGERLAKE = 40, - MFX_PLATFORM_ROCKETLAKE = 42, - MFX_PLATFORM_ALDERLAKE_S = 43, - MFX_PLATFORM_KEEMBAY = 50, -}; - -#if (MFX_VERSION >= 1031) -typedef enum -{ - MFX_MEDIA_UNKNOWN = 0xffff, - MFX_MEDIA_INTEGRATED = 0, - MFX_MEDIA_DISCRETE = 1 -} mfxMediaAdapterType; -#endif - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU16 CodeName; - mfxU16 DeviceId; -#if (MFX_VERSION >= 1031) - mfxU16 MediaAdapterType; - mfxU16 reserved[13]; -#else - mfxU16 reserved[14]; -#endif -} mfxPlatform; -MFX_PACK_END() - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxdefs.h b/.github/actions/libmfx/include/mfx/mfxdefs.h deleted file mode 100644 index ac76aa9..0000000 --- a/.github/actions/libmfx/include/mfx/mfxdefs.h +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) 2019-2020 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXDEFS_H__ -#define __MFXDEFS_H__ - -#define MFX_VERSION_MAJOR 1 -#define MFX_VERSION_MINOR 35 - -// 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) - -// 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_MINOR - #define MFX_VERSION_MINOR ((MFX_VERSION) % 1000) -#endif - - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* In preprocessor syntax # symbol has stringize meaning, - so to expand some macro to preprocessor pragma we need to use - special compiler dependent construction */ - -#if defined(_MSC_VER) - #define MFX_PRAGMA_IMPL(x) __pragma(x) -#else - #define MFX_PRAGMA_IMPL(x) _Pragma(#x) -#endif - -#define MFX_PACK_BEGIN_X(x) MFX_PRAGMA_IMPL(pack(push, x)) -#define MFX_PACK_END() MFX_PRAGMA_IMPL(pack(pop)) - -/* The general rule for alignment is following: - - structures with pointers have 4/8 bytes alignment on 32/64 bit systems - - structures with fields of type mfxU64/mfxF64 (unsigned long long / double) - have alignment 8 bytes on 64 bit and 32 bit Windows, on Linux alignment is 4 bytes - - all the rest structures are 4 bytes aligned - - there are several exceptions: some structs which had 4-byte alignment were extended - with pointer / long type fields; such structs have 4-byte alignment to keep binary - compatibility with previously release API */ - -#define MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_X(4) - -/* 64-bit LP64 data model */ -#if defined(_WIN64) || defined(__LP64__) - #define MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_X(8) - #define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(8) -/* 32-bit ILP32 data model Windows (Intel architecture) */ -#elif defined(_WIN32) || defined(_M_IX86) && !defined(__linux__) - #define MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_X(4) - #define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(8) -/* 32-bit ILP32 data model Linux */ -#elif defined(__ILP32__) - #define MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_X(4) - #define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(4) -#else - #error Unknown packing -#endif - - #define __INT64 long long - #define __UINT64 unsigned long long - -#ifdef _WIN32 - #define MFX_CDECL __cdecl - #define MFX_STDCALL __stdcall -#else - #define MFX_CDECL - #define MFX_STDCALL -#endif /* _WIN32 */ - -#define MFX_INFINITE 0xFFFFFFFF - -#if !defined(MFX_DEPRECATED_OFF) && (MFX_VERSION >= 1034) -#define MFX_DEPRECATED_OFF -#endif - -#ifndef MFX_DEPRECATED_OFF - #if defined(__cplusplus) && __cplusplus >= 201402L - #define MFX_DEPRECATED [[deprecated]] - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg [[deprecated]] - #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) - #elif defined(__clang__) - #define MFX_DEPRECATED __attribute__((deprecated)) - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated)) - #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) - #elif defined(__INTEL_COMPILER) - #if (defined(_WIN32) || defined(_WIN64)) - #define MFX_DEPRECATED __declspec(deprecated) - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg - #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg)) - #elif defined(__linux__) - #define MFX_DEPRECATED __attribute__((deprecated)) - #if defined(__cplusplus) - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated)) - #else - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg - #endif - #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) - #endif - #elif defined(_MSC_VER) && _MSC_VER > 1200 // VS 6 doesn't support deprecation - #define MFX_DEPRECATED __declspec(deprecated) - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg - #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg)) - #elif defined(__GNUC__) - #define MFX_DEPRECATED __attribute__((deprecated)) - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated)) - #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) - #else - #define MFX_DEPRECATED - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg - #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) - #endif -#else - #define MFX_DEPRECATED - #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg - #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) -#endif - -typedef unsigned char mfxU8; -typedef char mfxI8; -typedef short mfxI16; -typedef unsigned short mfxU16; -typedef unsigned int mfxU32; -typedef int mfxI32; -#if defined( _WIN32 ) || defined ( _WIN64 ) -typedef unsigned long mfxUL32; -typedef long mfxL32; -#else -typedef unsigned int mfxUL32; -typedef int mfxL32; -#endif -typedef float mfxF32; -typedef double mfxF64; -typedef __UINT64 mfxU64; -typedef __INT64 mfxI64; -typedef void* mfxHDL; -typedef mfxHDL mfxMemId; -typedef void* mfxThreadTask; -typedef char mfxChar; - -typedef struct { - mfxI16 x; - mfxI16 y; -} mfxI16Pair; - -typedef struct { - mfxHDL first; - mfxHDL second; -} mfxHDLPair; - - -/*********************************************************************************\ -Error message -\*********************************************************************************/ -typedef enum -{ - /* no error */ - MFX_ERR_NONE = 0, /* no error */ - - /* reserved for unexpected errors */ - MFX_ERR_UNKNOWN = -1, /* unknown error. */ - - /* error codes <0 */ - MFX_ERR_NULL_PTR = -2, /* null pointer */ - MFX_ERR_UNSUPPORTED = -3, /* undeveloped feature */ - MFX_ERR_MEMORY_ALLOC = -4, /* failed to allocate memory */ - MFX_ERR_NOT_ENOUGH_BUFFER = -5, /* insufficient buffer at input/output */ - MFX_ERR_INVALID_HANDLE = -6, /* invalid handle */ - MFX_ERR_LOCK_MEMORY = -7, /* failed to lock the memory block */ - MFX_ERR_NOT_INITIALIZED = -8, /* member function called before initialization */ - MFX_ERR_NOT_FOUND = -9, /* the specified object is not found */ - MFX_ERR_MORE_DATA = -10, /* expect more data at input */ - MFX_ERR_MORE_SURFACE = -11, /* expect more surface at output */ - MFX_ERR_ABORTED = -12, /* operation aborted */ - MFX_ERR_DEVICE_LOST = -13, /* lose the HW acceleration device */ - MFX_ERR_INCOMPATIBLE_VIDEO_PARAM = -14, /* incompatible video parameters */ - MFX_ERR_INVALID_VIDEO_PARAM = -15, /* invalid video parameters */ - MFX_ERR_UNDEFINED_BEHAVIOR = -16, /* undefined behavior */ - MFX_ERR_DEVICE_FAILED = -17, /* device operation failure */ - MFX_ERR_MORE_BITSTREAM = -18, /* expect more bitstream buffers at output */ - MFX_ERR_INCOMPATIBLE_AUDIO_PARAM = -19, /* incompatible audio parameters */ - MFX_ERR_INVALID_AUDIO_PARAM = -20, /* invalid audio parameters */ - MFX_ERR_GPU_HANG = -21, /* device operation failure caused by GPU hang */ - MFX_ERR_REALLOC_SURFACE = -22, /* bigger output surface required */ - - /* warnings >0 */ - MFX_WRN_IN_EXECUTION = 1, /* the previous asynchronous operation is in execution */ - MFX_WRN_DEVICE_BUSY = 2, /* the HW acceleration device is busy */ - MFX_WRN_VIDEO_PARAM_CHANGED = 3, /* the video parameters are changed during decoding */ - MFX_WRN_PARTIAL_ACCELERATION = 4, /* SW is used */ - MFX_WRN_INCOMPATIBLE_VIDEO_PARAM = 5, /* incompatible video parameters */ - MFX_WRN_VALUE_NOT_CHANGED = 6, /* the value is saturated based on its valid range */ - MFX_WRN_OUT_OF_RANGE = 7, /* the value is out of valid range */ - MFX_WRN_FILTER_SKIPPED = 10, /* one of requested filters has been skipped */ - MFX_WRN_INCOMPATIBLE_AUDIO_PARAM = 11, /* incompatible audio parameters */ - -#if MFX_VERSION >= 1031 - /* low-delay partial output */ - MFX_ERR_NONE_PARTIAL_OUTPUT = 12, /* frame is not ready, but bitstream contains partial output */ -#endif - - /* threading statuses */ - MFX_TASK_DONE = MFX_ERR_NONE, /* task has been completed */ - MFX_TASK_WORKING = 8, /* there is some more work to do */ - MFX_TASK_BUSY = 9, /* task is waiting for resources */ - - /* plug-in statuses */ - MFX_ERR_MORE_DATA_SUBMIT_TASK = -10000, /* return MFX_ERR_MORE_DATA but submit internal asynchronous task */ - -} mfxStatus; - - -// Application -#if defined(MFX_DISPATCHER_EXPOSED_PREFIX) - -#include "mfxdispatcherprefixedfunctions.h" - -#endif // MFX_DISPATCHER_EXPOSED_PREFIX - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __MFXDEFS_H__ */ diff --git a/.github/actions/libmfx/include/mfx/mfxdispatcherprefixedfunctions.h b/.github/actions/libmfx/include/mfx/mfxdispatcherprefixedfunctions.h deleted file mode 100644 index 8cefabd..0000000 --- a/.github/actions/libmfx/include/mfx/mfxdispatcherprefixedfunctions.h +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2017 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - - -#ifndef __MFXDISPATCHERPREFIXEDFUNCTIONS_H__ -#define __MFXDISPATCHERPREFIXEDFUNCTIONS_H__ - -// API 1.0 functions -#define MFXInit disp_MFXInit -#define MFXClose disp_MFXClose -#define MFXQueryIMPL disp_MFXQueryIMPL -#define MFXQueryVersion disp_MFXQueryVersion - -#define MFXJoinSession disp_MFXJoinSession -#define MFXDisjoinSession disp_MFXDisjoinSession -#define MFXCloneSession disp_MFXCloneSession -#define MFXSetPriority disp_MFXSetPriority -#define MFXGetPriority disp_MFXGetPriority - -#define MFXVideoCORE_SetBufferAllocator disp_MFXVideoCORE_SetBufferAllocator -#define MFXVideoCORE_SetFrameAllocator disp_MFXVideoCORE_SetFrameAllocator -#define MFXVideoCORE_SetHandle disp_MFXVideoCORE_SetHandle -#define MFXVideoCORE_GetHandle disp_MFXVideoCORE_GetHandle -#define MFXVideoCORE_SyncOperation disp_MFXVideoCORE_SyncOperation - -#define MFXVideoENCODE_Query disp_MFXVideoENCODE_Query -#define MFXVideoENCODE_QueryIOSurf disp_MFXVideoENCODE_QueryIOSurf -#define MFXVideoENCODE_Init disp_MFXVideoENCODE_Init -#define MFXVideoENCODE_Reset disp_MFXVideoENCODE_Reset -#define MFXVideoENCODE_Close disp_MFXVideoENCODE_Close -#define MFXVideoENCODE_GetVideoParam disp_MFXVideoENCODE_GetVideoParam -#define MFXVideoENCODE_GetEncodeStat disp_MFXVideoENCODE_GetEncodeStat -#define MFXVideoENCODE_EncodeFrameAsync disp_MFXVideoENCODE_EncodeFrameAsync - -#define MFXVideoDECODE_Query disp_MFXVideoDECODE_Query -#define MFXVideoDECODE_DecodeHeader disp_MFXVideoDECODE_DecodeHeader -#define MFXVideoDECODE_QueryIOSurf disp_MFXVideoDECODE_QueryIOSurf -#define MFXVideoDECODE_Init disp_MFXVideoDECODE_Init -#define MFXVideoDECODE_Reset disp_MFXVideoDECODE_Reset -#define MFXVideoDECODE_Close disp_MFXVideoDECODE_Close -#define MFXVideoDECODE_GetVideoParam disp_MFXVideoDECODE_GetVideoParam -#define MFXVideoDECODE_GetDecodeStat disp_MFXVideoDECODE_GetDecodeStat -#define MFXVideoDECODE_SetSkipMode disp_MFXVideoDECODE_SetSkipMode -#define MFXVideoDECODE_GetPayload disp_MFXVideoDECODE_GetPayload -#define MFXVideoDECODE_DecodeFrameAsync disp_MFXVideoDECODE_DecodeFrameAsync - -#define MFXVideoVPP_Query disp_MFXVideoVPP_Query -#define MFXVideoVPP_QueryIOSurf disp_MFXVideoVPP_QueryIOSurf -#define MFXVideoVPP_Init disp_MFXVideoVPP_Init -#define MFXVideoVPP_Reset disp_MFXVideoVPP_Reset -#define MFXVideoVPP_Close disp_MFXVideoVPP_Close - -#define MFXVideoVPP_GetVideoParam disp_MFXVideoVPP_GetVideoParam -#define MFXVideoVPP_GetVPPStat disp_MFXVideoVPP_GetVPPStat -#define MFXVideoVPP_RunFrameVPPAsync disp_MFXVideoVPP_RunFrameVPPAsync - -// API 1.1 functions -#define MFXVideoUSER_Register disp_MFXVideoUSER_Register -#define MFXVideoUSER_Unregister disp_MFXVideoUSER_Unregister -#define MFXVideoUSER_ProcessFrameAsync disp_MFXVideoUSER_ProcessFrameAsync - -// API 1.10 functions - -#define MFXVideoENC_Query disp_MFXVideoENC_Query -#define MFXVideoENC_QueryIOSurf disp_MFXVideoENC_QueryIOSurf -#define MFXVideoENC_Init disp_MFXVideoENC_Init -#define MFXVideoENC_Reset disp_MFXVideoENC_Reset -#define MFXVideoENC_Close disp_MFXVideoENC_Close -#define MFXVideoENC_ProcessFrameAsync disp_MFXVideoENC_ProcessFrameAsync -#define MFXVideoVPP_RunFrameVPPAsyncEx disp_MFXVideoVPP_RunFrameVPPAsyncEx -#define MFXVideoUSER_Load disp_MFXVideoUSER_Load -#define MFXVideoUSER_UnLoad disp_MFXVideoUSER_UnLoad - -// API 1.11 functions - -#define MFXVideoPAK_Query disp_MFXVideoPAK_Query -#define MFXVideoPAK_QueryIOSurf disp_MFXVideoPAK_QueryIOSurf -#define MFXVideoPAK_Init disp_MFXVideoPAK_Init -#define MFXVideoPAK_Reset disp_MFXVideoPAK_Reset -#define MFXVideoPAK_Close disp_MFXVideoPAK_Close -#define MFXVideoPAK_ProcessFrameAsync disp_MFXVideoPAK_ProcessFrameAsync - -// API 1.13 functions - -#define MFXVideoUSER_LoadByPath disp_MFXVideoUSER_LoadByPath - -// API 1.14 functions -#define MFXInitEx disp_MFXInitEx -#define MFXDoWork disp_MFXDoWork - -// Audio library functions - -// API 1.8 functions - -#define MFXAudioCORE_SyncOperation disp_MFXAudioCORE_SyncOperation -#define MFXAudioENCODE_Query disp_MFXAudioENCODE_Query -#define MFXAudioENCODE_QueryIOSize disp_MFXAudioENCODE_QueryIOSize -#define MFXAudioENCODE_Init disp_MFXAudioENCODE_Init -#define MFXAudioENCODE_Reset disp_MFXAudioENCODE_Reset -#define MFXAudioENCODE_Close disp_MFXAudioENCODE_Close -#define MFXAudioENCODE_GetAudioParam disp_MFXAudioENCODE_GetAudioParam -#define MFXAudioENCODE_EncodeFrameAsync disp_MFXAudioENCODE_EncodeFrameAsync - -#define MFXAudioDECODE_Query disp_MFXAudioDECODE_Query -#define MFXAudioDECODE_DecodeHeader disp_MFXAudioDECODE_DecodeHeader -#define MFXAudioDECODE_Init disp_MFXAudioDECODE_Init -#define MFXAudioDECODE_Reset disp_MFXAudioDECODE_Reset -#define MFXAudioDECODE_Close disp_MFXAudioDECODE_Close -#define MFXAudioDECODE_QueryIOSize disp_MFXAudioDECODE_QueryIOSize -#define MFXAudioDECODE_GetAudioParam disp_MFXAudioDECODE_GetAudioParam -#define MFXAudioDECODE_DecodeFrameAsync disp_MFXAudioDECODE_DecodeFrameAsync - -// API 1.9 functions - -#define MFXAudioUSER_Register disp_MFXAudioUSER_Register -#define MFXAudioUSER_Unregister disp_MFXAudioUSER_Unregister -#define MFXAudioUSER_ProcessFrameAsync disp_MFXAudioUSER_ProcessFrameAsync -#define MFXAudioUSER_Load disp_MFXAudioUSER_Load -#define MFXAudioUSER_UnLoad disp_MFXAudioUSER_UnLoad - -// API 1.19 functions - -#define MFXVideoENC_GetVideoParam disp_MFXVideoENC_GetVideoParam -#define MFXVideoPAK_GetVideoParam disp_MFXVideoPAK_GetVideoParam -#define MFXVideoCORE_QueryPlatform disp_MFXVideoCORE_QueryPlatform -#define MFXVideoUSER_GetPlugin disp_MFXVideoUSER_GetPlugin - -#endif \ No newline at end of file diff --git a/.github/actions/libmfx/include/mfx/mfxenc.h b/.github/actions/libmfx/include/mfx/mfxenc.h deleted file mode 100644 index 0971601..0000000 --- a/.github/actions/libmfx/include/mfx/mfxenc.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2017-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXENC_H__ -#define __MFXENC_H__ -#include "mfxdefs.h" -#include "mfxvstructures.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct _mfxENCInput{ - mfxU32 reserved[32]; - - mfxFrameSurface1 *InSurface; - - mfxU16 NumFrameL0; - mfxFrameSurface1 **L0Surface; - mfxU16 NumFrameL1; - mfxFrameSurface1 **L1Surface; - - mfxU16 NumExtParam; - mfxExtBuffer **ExtParam; -} mfxENCInput; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct _mfxENCOutput{ - mfxU32 reserved[32]; - - mfxFrameSurface1 *OutSurface; - - mfxU16 NumExtParam; - mfxExtBuffer **ExtParam; -} mfxENCOutput; -MFX_PACK_END() - - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest *request); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_Init(mfxSession session, mfxVideoParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_Reset(mfxSession session, mfxVideoParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_Close(mfxSession session); - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_ProcessFrameAsync(mfxSession session, mfxENCInput *in, mfxENCOutput *out, mfxSyncPoint *syncp); - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_GetVideoParam(mfxSession session, mfxVideoParam *par); - -#ifdef __cplusplus -} // extern "C" -#endif /* __cplusplus */ - - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxfei.h b/.github/actions/libmfx/include/mfx/mfxfei.h deleted file mode 100644 index c2be301..0000000 --- a/.github/actions/libmfx/include/mfx/mfxfei.h +++ /dev/null @@ -1,614 +0,0 @@ -// Copyright (c) 2018-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXFEI_H__ -#define __MFXFEI_H__ -#include "mfxdefs.h" -#include "mfxvstructures.h" -#include "mfxpak.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 Qp; - mfxU16 LenSP; - mfxU16 SearchPath; - mfxU16 SubMBPartMask; - mfxU16 SubPelMode; - mfxU16 InterSAD; - mfxU16 IntraSAD; - mfxU16 AdaptiveSearch; - mfxU16 MVPredictor; - mfxU16 MBQp; - mfxU16 FTEnable; - mfxU16 IntraPartMask; - mfxU16 RefWidth; - mfxU16 RefHeight; - mfxU16 SearchWindow; - mfxU16 DisableMVOutput; - mfxU16 DisableStatisticsOutput; - mfxU16 Enable8x8Stat; - mfxU16 PictureType; /* Input picture type*/ - mfxU16 DownsampleInput; - - mfxU16 RefPictureType[2]; /* reference picture type, 0 -L0, 1 - L1 */ - mfxU16 DownsampleReference[2]; - mfxFrameSurface1 *RefFrame[2]; - mfxU16 reserved[28]; -} mfxExtFeiPreEncCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; /* size of allocated memory in number of macroblocks */ - mfxU16 reserved2[20]; - - struct mfxExtFeiPreEncMVPredictorsMB { - mfxI16Pair MV[2]; /* 0 for L0 and 1 for L1 */ - } *MB; -} mfxExtFeiPreEncMVPredictors; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 reserved2[20]; - - mfxU8 *MB; -} mfxExtFeiEncQP; -MFX_PACK_END() - -/* PreENC output */ -/* Layout is exactly the same as mfxExtFeiEncMVs, this buffer may be removed in future */ -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 reserved2[20]; - - struct mfxExtFeiPreEncMVMB { - mfxI16Pair MV[16][2]; - } *MB; -} mfxExtFeiPreEncMV; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 reserved2[20]; - - struct mfxExtFeiPreEncMBStatMB { - struct mfxExtFeiPreEncMBStatMBInter { - mfxU16 BestDistortion; - mfxU16 Mode ; - } Inter[2]; /*0 -L0, 1 - L1*/ - - mfxU16 BestIntraDistortion; - mfxU16 IntraMode ; - - mfxU16 NumOfNonZeroCoef; - mfxU16 reserved1; - mfxU32 SumOfCoef; - - mfxU32 reserved2; - - mfxU32 Variance16x16; - mfxU32 Variance8x8[4]; - mfxU32 PixelAverage16x16; - mfxU32 PixelAverage8x8[4]; - } *MB; -} mfxExtFeiPreEncMBStat; -MFX_PACK_END() - -/* 1 ENC_PAK input */ -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 SearchPath; - mfxU16 LenSP; - mfxU16 SubMBPartMask; - mfxU16 IntraPartMask; - mfxU16 MultiPredL0; - mfxU16 MultiPredL1; - mfxU16 SubPelMode; - mfxU16 InterSAD; - mfxU16 IntraSAD; - mfxU16 DistortionType; - mfxU16 RepartitionCheckEnable; - mfxU16 AdaptiveSearch; - mfxU16 MVPredictor; - mfxU16 NumMVPredictors[2]; - mfxU16 PerMBQp; - mfxU16 PerMBInput; - mfxU16 MBSizeCtrl; - mfxU16 RefWidth; - mfxU16 RefHeight; - mfxU16 SearchWindow; - mfxU16 ColocatedMbDistortion; - mfxU16 reserved[38]; -} mfxExtFeiEncFrameCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 reserved2[20]; - - struct mfxExtFeiEncMVPredictorsMB { - struct mfxExtFeiEncMVPredictorsMBRefIdx{ - mfxU8 RefL0: 4; - mfxU8 RefL1: 4; - } RefIdx[4]; /* index is predictor number */ - mfxU32 reserved; - mfxI16Pair MV[4][2]; /* first index is predictor number, second is 0 for L0 and 1 for L1 */ - } *MB; -} mfxExtFeiEncMVPredictors; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 reserved2[20]; - - struct mfxExtFeiEncMBCtrlMB { - mfxU32 ForceToIntra : 1; - mfxU32 ForceToSkip : 1; - mfxU32 ForceToNoneSkip : 1; -#if (MFX_VERSION >= 1025) - mfxU32 DirectBiasAdjustment : 1; - mfxU32 GlobalMotionBiasAdjustment : 1; - mfxU32 MVCostScalingFactor : 3; - - mfxU32 reserved1 : 24; -#else - mfxU32 reserved1 : 29; -#endif - mfxU32 reserved2; - mfxU32 reserved3; - - mfxU32 reserved4 : 16; - mfxU32 TargetSizeInWord : 8; - mfxU32 MaxSizeInWord : 8; - } *MB; -} mfxExtFeiEncMBCtrl; -MFX_PACK_END() - -/* 1 ENC_PAK output */ -/* Buffer holds 32 MVs per MB. MVs are located in zigzag scan order. -Number in diagram below shows location of MV in memory. -For example, MV for right top 4x4 sub block is stored in 5-th element of the array. -======================== -|| 00 | 01 || 04 | 05 || ------------------------- -|| 02 | 03 || 06 | 07 || -======================== -|| 08 | 09 || 12 | 13 || ------------------------- -|| 10 | 11 || 14 | 15 || -======================== -*/ -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 reserved2[20]; - - struct mfxExtFeiEncMVMB { - mfxI16Pair MV[16][2]; /* first index is block (4x4 pixels) number, second is 0 for L0 and 1 for L1 */ - } *MB; -} mfxExtFeiEncMV; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 reserved2[20]; - - struct mfxExtFeiEncMBStatMB { - mfxU16 InterDistortion[16]; - mfxU16 BestInterDistortion; - mfxU16 BestIntraDistortion; - mfxU16 ColocatedMbDistortion; - mfxU16 reserved; - mfxU32 reserved1[2]; - } *MB; -} mfxExtFeiEncMBStat; -MFX_PACK_END() - -enum { - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PAK_OBJECT_HEADER) = 0x7149000A -}; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PAK_OBJECT_HEADER); - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - /* dword 0-2 */ - mfxU32 Header; /* MFX_PAK_OBJECT_HEADER */ - mfxU32 MVDataLength; - mfxU32 MVDataOffset; - - /* dword 3 */ - mfxU32 InterMbMode : 2; - mfxU32 MBSkipFlag : 1; - mfxU32 Reserved00 : 1; - mfxU32 IntraMbMode : 2; - mfxU32 Reserved01 : 1; - mfxU32 FieldMbPolarityFlag : 1; - mfxU32 MbType : 5; - mfxU32 IntraMbFlag : 1; - mfxU32 FieldMbFlag : 1; - mfxU32 Transform8x8Flag : 1; - mfxU32 Reserved02 : 1; - mfxU32 DcBlockCodedCrFlag : 1; - mfxU32 DcBlockCodedCbFlag : 1; - mfxU32 DcBlockCodedYFlag : 1; - mfxU32 MVFormat : 3; /* layout and number of MVs, 0 - no MVs, 6 - 32 MVs, the rest are reserved */ - mfxU32 Reserved03 : 8; - mfxU32 ExtendedFormat : 1; /* should be 1, specifies that LumaIntraPredModes and RefIdx are replicated for 8x8 and 4x4 block/subblock */ - - /* dword 4 */ - mfxU8 HorzOrigin; - mfxU8 VertOrigin; - mfxU16 CbpY; - - /* dword 5 */ - mfxU16 CbpCb; - mfxU16 CbpCr; - - /* dword 6 */ - mfxU32 QpPrimeY : 8; - mfxU32 Reserved30 :17; - mfxU32 MbSkipConvDisable : 1; - mfxU32 IsLastMB : 1; - mfxU32 EnableCoefficientClamp : 1; - mfxU32 Direct8x8Pattern : 4; - - union { - struct {/* Intra MBs */ - /* dword 7-8 */ - mfxU16 LumaIntraPredModes[4]; - - /* dword 9 */ - mfxU32 ChromaIntraPredMode : 2; - mfxU32 IntraPredAvailFlags : 6; - mfxU32 Reserved60 : 24; - } IntraMB; - struct {/* Inter MBs */ - /*dword 7 */ - mfxU8 SubMbShapes; - mfxU8 SubMbPredModes; - mfxU16 Reserved40; - - /* dword 8-9 */ - mfxU8 RefIdx[2][4]; /* first index is 0 for L0 and 1 for L1 */ - } InterMB; - }; - - /* dword 10 */ - mfxU16 Reserved70; - mfxU8 TargetSizeInWord; - mfxU8 MaxSizeInWord; - - mfxU32 reserved2[5]; -}mfxFeiPakMBCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 reserved2[20]; - - mfxFeiPakMBCtrl *MB; -} mfxExtFeiPakMBCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 MaxFrameSize; /* in bytes */ - mfxU32 NumPasses; /* up to 8 */ - mfxU16 reserved[8]; - mfxU8 DeltaQP[8]; /* list of delta QPs, only positive values */ -} mfxExtFeiRepackCtrl; -MFX_PACK_END() - -#if (MFX_VERSION >= 1025) -/* FEI repack status */ -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 NumPasses; - mfxU16 reserved[58]; -} mfxExtFeiRepackStat; -MFX_PACK_END() -#endif - -/* 1 decode stream out */ -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - /* dword 0 */ - mfxU32 InterMbMode : 2; - mfxU32 MBSkipFlag : 1; - mfxU32 Reserved00 : 1; - mfxU32 IntraMbMode : 2; - mfxU32 Reserved01 : 1; - mfxU32 FieldMbPolarityFlag : 1; - mfxU32 MbType : 5; - mfxU32 IntraMbFlag : 1; - mfxU32 FieldMbFlag : 1; - mfxU32 Transform8x8Flag : 1; - mfxU32 Reserved02 : 1; - mfxU32 DcBlockCodedCrFlag : 1; - mfxU32 DcBlockCodedCbFlag : 1; - mfxU32 DcBlockCodedYFlag : 1; - mfxU32 Reserved03 :12; - - /* dword 1 */ - mfxU16 HorzOrigin; - mfxU16 VertOrigin; - - /* dword 2 */ - mfxU32 CbpY :16; - mfxU32 CbpCb : 4; - mfxU32 CbpCr : 4; - mfxU32 Reserved20 : 6; - mfxU32 IsLastMB : 1; - mfxU32 ConcealMB : 1; - - /* dword 3 */ - mfxU32 QpPrimeY : 7; - mfxU32 Reserved30 : 1; - mfxU32 Reserved31 : 8; - mfxU32 NzCoeffCount : 9; - mfxU32 Reserved32 : 3; - mfxU32 Direct8x8Pattern : 4; - - /* dword 4-6 */ - union { - struct {/* Intra MBs */ - /* dword 4-5 */ - mfxU16 LumaIntraPredModes[4]; - - /* dword 6 */ - mfxU32 ChromaIntraPredMode : 2; - mfxU32 IntraPredAvailFlags : 6; - mfxU32 Reserved60 : 24; - } IntraMB; - - struct {/* Inter MBs */ - /* dword 4 */ - mfxU8 SubMbShapes; - mfxU8 SubMbPredModes; - mfxU16 Reserved40; - - /* dword 5-6 */ - mfxU8 RefIdx[2][4]; /* first index is 0 for L0 and 1 for L1 */ - } InterMB; - }; - - /* dword 7 */ - mfxU32 Reserved70; - - /* dword 8-15 */ - mfxI16Pair MV[4][2]; /* L0 - 0, L1 - 1 */ -}mfxFeiDecStreamOutMBCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[3]; - mfxU32 NumMBAlloc; - mfxU16 RemapRefIdx; /* tri-state option, default is OFF */ - mfxU16 PicStruct; - mfxU16 reserved2[18]; - - mfxFeiDecStreamOutMBCtrl *MB; -} mfxExtFeiDecStreamOut; -MFX_PACK_END() - -/* SPS, PPS, Slice Header */ -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 SPSId; - - mfxU16 PicOrderCntType; - mfxU16 Log2MaxPicOrderCntLsb; - mfxU16 reserved[121]; -} mfxExtFeiSPS; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 SPSId; - mfxU16 PPSId; - - mfxU16 PictureType; - mfxU16 FrameType; - mfxU16 PicInitQP; - mfxU16 NumRefIdxL0Active; - mfxU16 NumRefIdxL1Active; - mfxI16 ChromaQPIndexOffset; - mfxI16 SecondChromaQPIndexOffset; - mfxU16 Transform8x8ModeFlag; - mfxU16 reserved[114]; - - struct mfxExtFeiPpsDPB { - mfxU16 Index; /* index in mfxPAKInput::L0Surface array */ - mfxU16 PicType; - mfxI32 FrameNumWrap; - mfxU16 LongTermFrameIdx; - mfxU16 reserved[3]; - } DpbBefore[16], DpbAfter[16]; -} mfxExtFeiPPS; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 NumSlice; /* actual number of slices in the picture */ - mfxU16 reserved[11]; - - struct mfxSlice{ - mfxU16 MBAddress; - mfxU16 NumMBs; - mfxU16 SliceType; - mfxU16 PPSId; - mfxU16 IdrPicId; - - mfxU16 CabacInitIdc; - - mfxU16 NumRefIdxL0Active; - mfxU16 NumRefIdxL1Active; - - mfxI16 SliceQPDelta; - mfxU16 DisableDeblockingFilterIdc; - mfxI16 SliceAlphaC0OffsetDiv2; - mfxI16 SliceBetaOffsetDiv2; - mfxU16 reserved[20]; - - struct mfxSliceRef{ - mfxU16 PictureType; - mfxU16 Index; - mfxU16 reserved[2]; - } RefL0[32], RefL1[32]; /* index in mfxPAKInput::L0Surface array */ - - } *Slice; -}mfxExtFeiSliceHeader; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 DisableHME; /* 0 - enable, any other value means disable */ - mfxU16 DisableSuperHME; - mfxU16 DisableUltraHME; - - mfxU16 reserved[57]; -} mfxExtFeiCodingOption; -MFX_PACK_END() - -/* 1 functions */ -typedef enum { - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_FEI_FUNCTION_PREENC) =1, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_FEI_FUNCTION_ENCODE) =2, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_FEI_FUNCTION_ENC) =3, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_FEI_FUNCTION_PAK) =4, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_FEI_FUNCTION_DEC) =5, -} mfxFeiFunction; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_FEI_FUNCTION_PREENC); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_FEI_FUNCTION_ENCODE); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_FEI_FUNCTION_ENC); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_FEI_FUNCTION_PAK); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_FEI_FUNCTION_DEC); - -enum { - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_PARAM) = MFX_MAKEFOURCC('F','E','P','R'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_PREENC_CTRL) = MFX_MAKEFOURCC('F','P','C','T'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_PREENC_MV_PRED) = MFX_MAKEFOURCC('F','P','M','P'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_PREENC_MV) = MFX_MAKEFOURCC('F','P','M','V'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_PREENC_MB) = MFX_MAKEFOURCC('F','P','M','B'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_ENC_CTRL) = MFX_MAKEFOURCC('F','E','C','T'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_ENC_MV_PRED) = MFX_MAKEFOURCC('F','E','M','P'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_ENC_QP) = MFX_MAKEFOURCC('F','E','Q','P'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_ENC_MV) = MFX_MAKEFOURCC('F','E','M','V'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_ENC_MB) = MFX_MAKEFOURCC('F','E','M','B'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_ENC_MB_STAT) = MFX_MAKEFOURCC('F','E','S','T'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_PAK_CTRL) = MFX_MAKEFOURCC('F','K','C','T'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_SPS) = MFX_MAKEFOURCC('F','S','P','S'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_PPS) = MFX_MAKEFOURCC('F','P','P','S'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_SLICE) = MFX_MAKEFOURCC('F','S','L','C'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_CODING_OPTION) = MFX_MAKEFOURCC('F','C','D','O'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_DEC_STREAM_OUT) = MFX_MAKEFOURCC('F','D','S','O'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_REPACK_CTRL) = MFX_MAKEFOURCC('F','E','R','P'), -#if (MFX_VERSION >= 1025) - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_FEI_REPACK_STAT) = MFX_MAKEFOURCC('F','E','R','S') -#endif -}; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_PARAM); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_PREENC_CTRL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_PREENC_MV_PRED); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_PREENC_MV); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_PREENC_MB); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_ENC_CTRL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_ENC_MV_PRED); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_ENC_QP); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_ENC_MV); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_ENC_MB); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_ENC_MB_STAT); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_PAK_CTRL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_SPS); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_PPS); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_SLICE); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_CODING_OPTION); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_DEC_STREAM_OUT); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_REPACK_CTRL); - -#if (MFX_VERSION >= 1025) - MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_FEI_REPACK_STAT); -#endif - -/* should be attached to mfxVideoParam during initialization to indicate FEI function */ -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxFeiFunction Func; - mfxU16 SingleFieldProcessing; - mfxU16 reserved[57]; -} mfxExtFeiParam; -MFX_PACK_END() - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - - -#endif diff --git a/.github/actions/libmfx/include/mfx/mfxfeihevc.h b/.github/actions/libmfx/include/mfx/mfxfeihevc.h deleted file mode 100644 index 6c86ded..0000000 --- a/.github/actions/libmfx/include/mfx/mfxfeihevc.h +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) 2018-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXFEIHEVC_H__ -#define __MFXFEIHEVC_H__ -#include "mfxcommon.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -#if (MFX_VERSION >= 1027) - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 SearchPath; - mfxU16 LenSP; - mfxU16 RefWidth; - mfxU16 RefHeight; - mfxU16 SearchWindow; - - mfxU16 NumMvPredictors[2]; /* 0 for L0 and 1 for L1 */ - mfxU16 MultiPred[2]; /* 0 for L0 and 1 for L1 */ - - mfxU16 SubPelMode; - mfxU16 AdaptiveSearch; - mfxU16 MVPredictor; - - mfxU16 PerCuQp; - mfxU16 PerCtuInput; - mfxU16 ForceCtuSplit; - mfxU16 NumFramePartitions; - mfxU16 FastIntraMode; - - mfxU16 reserved0[107]; -} mfxExtFeiHevcEncFrameCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - struct { - mfxU8 RefL0 : 4; - mfxU8 RefL1 : 4; - } RefIdx[4]; /* index is predictor number */ - - mfxU32 BlockSize : 2; - mfxU32 reserved0 : 30; - - mfxI16Pair MV[4][2]; /* first index is predictor number, second is 0 for L0 and 1 for L1 */ -} mfxFeiHevcEncMVPredictors; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 VaBufferID; - mfxU32 Pitch; - mfxU32 Height; - mfxU16 reserved0[54]; - - mfxFeiHevcEncMVPredictors *Data; -} mfxExtFeiHevcEncMVPredictors; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 VaBufferID; - mfxU32 Pitch; - mfxU32 Height; - mfxU16 reserved[6]; - - mfxU8 *Data; -} mfxExtFeiHevcEncQP; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxU32 ForceToIntra : 1; - mfxU32 ForceToInter : 1; - mfxU32 reserved0 : 30; - - mfxU32 reserved1[3]; -} mfxFeiHevcEncCtuCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 VaBufferID; - mfxU32 Pitch; - mfxU32 Height; - mfxU16 reserved0[54]; - - mfxFeiHevcEncCtuCtrl *Data; -} mfxExtFeiHevcEncCtuCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 MaxFrameSize; /* in bytes */ - mfxU32 NumPasses; /* up to 8 */ - mfxU16 reserved[8]; - mfxU8 DeltaQP[8]; /* list of delta QPs, only positive values */ -} mfxExtFeiHevcRepackCtrl; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 NumPasses; - mfxU16 reserved[58]; -} mfxExtFeiHevcRepackStat; -MFX_PACK_END() - -#if MFX_VERSION >= MFX_VERSION_NEXT -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - /* DWORD 0 */ - mfxU32 reserved0; - - /* DWORD 1 */ - mfxU32 SplitLevel2Part0 : 4; - mfxU32 SplitLevel2Part1 : 4; - mfxU32 SplitLevel2Part2 : 4; - mfxU32 SplitLevel2Part3 : 4; - mfxU32 SplitLevel1 : 4; - mfxU32 SplitLevel0 : 1; - mfxU32 reserved10 : 3; - mfxU32 CuCountMinus1 : 6; - mfxU32 LastCtuOfTileFlag : 1; - mfxU32 LastCtuOfSliceFlag : 1; - - - /* DWORD 2 */ - mfxU32 CtuAddrX : 16; - mfxU32 CtuAddrY : 16; - - /* DWORD 3 */ - mfxU32 reserved3; -} mfxFeiHevcPakCtuRecordV0; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 VaBufferID; - mfxU32 Pitch; - mfxU32 Height; - mfxU16 reserved0[54]; - - mfxFeiHevcPakCtuRecordV0 *Data; -} mfxExtFeiHevcPakCtuRecordV0; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - /* DWORD 0 */ - mfxU32 CuSize : 2; - mfxU32 PredMode : 1; - mfxU32 TransquantBypass : 1; - mfxU32 PartMode : 3; - mfxU32 IpcmEnable : 1; - mfxU32 IntraChromaMode : 3; - mfxU32 ZeroOutCoeffs : 1; - mfxU32 reserved00 : 4; - mfxU32 Qp : 7; - mfxU32 QpSign : 1; - mfxU32 InterpredIdc : 8; - - - /* DWORD 1 */ - mfxU32 IntraMode0 : 6; - mfxU32 reserved10 : 2; - mfxU32 IntraMode1 : 6; - mfxU32 reserved11 : 2; - mfxU32 IntraMode2 : 6; - mfxU32 reserved12 : 2; - mfxU32 IntraMode3 : 6; - mfxU32 reserved13 : 2; - - - /* DWORD 2-9 */ - struct { - mfxI16 x[4]; - mfxI16 y[4]; - } MVs[2]; /* 0-L0, 1-L1 */ - - - /* DWORD 10 */ - struct{ - mfxU16 Ref0 : 4; - mfxU16 Ref1 : 4; - mfxU16 Ref2 : 4; - mfxU16 Ref3 : 4; - } RefIdx[2]; /* 0-L0, 1-L1 */ - - - /* DWORD 11 */ - mfxU32 TuSize; - - - /* DWORD 12 */ - mfxU32 TransformSkipY : 16; - mfxU32 reserved120 : 12; - mfxU32 TuCountM1 : 4; - - - /* DWORD 13 */ - mfxU32 TransformSkipU : 16; - mfxU32 TransformSkipV : 16; -} mfxFeiHevcPakCuRecordV0; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 VaBufferID; - mfxU32 Pitch; - mfxU32 Height; - mfxU16 reserved0[54]; - - mfxFeiHevcPakCuRecordV0 *Data; -} mfxExtFeiHevcPakCuRecordV0; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxU32 BestDistortion; - mfxU32 ColocatedCtuDistortion; -} mfxFeiHevcDistortionCtu; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 VaBufferID; - mfxU32 Pitch; - mfxU32 Height; - mfxU16 reserved[6]; - - mfxFeiHevcDistortionCtu *Data; -} mfxExtFeiHevcDistortion; -MFX_PACK_END() -#endif - - -enum { - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_CTRL) = MFX_MAKEFOURCC('F','H','C','T'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_MV_PRED) = MFX_MAKEFOURCC('F','H','P','D'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_QP) = MFX_MAKEFOURCC('F','H','Q','P'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_CTU_CTRL) = MFX_MAKEFOURCC('F','H','E','C'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_REPACK_CTRL) = MFX_MAKEFOURCC('F','H','R','P'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_REPACK_STAT) = MFX_MAKEFOURCC('F','H','R','S'), - -#if MFX_VERSION >= MFX_VERSION_NEXT - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_PAK_CTU_REC) = MFX_MAKEFOURCC('F','H','T','B'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_PAK_CU_REC) = MFX_MAKEFOURCC('F','H','C','U'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_DIST) = MFX_MAKEFOURCC('F','H','D','S') -#endif -}; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_CTRL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_MV_PRED); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_QP); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_CTU_CTRL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_REPACK_CTRL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_REPACK_STAT); - -#if MFX_VERSION >= MFX_VERSION_NEXT - MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_PAK_CTU_REC); - MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_PAK_CU_REC); - MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_DIST); -#endif - -#endif // MFX_VERSION - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - - -#endif // __MFXFEIHEVC_H__ diff --git a/.github/actions/libmfx/include/mfx/mfxjpeg.h b/.github/actions/libmfx/include/mfx/mfxjpeg.h deleted file mode 100644 index b1934e7..0000000 --- a/.github/actions/libmfx/include/mfx/mfxjpeg.h +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2017-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFX_JPEG_H__ -#define __MFX_JPEG_H__ - -#include "mfxdefs.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* CodecId */ -enum { - MFX_CODEC_JPEG = MFX_MAKEFOURCC('J','P','E','G') -}; - -/* CodecProfile, CodecLevel */ -enum -{ - MFX_PROFILE_JPEG_BASELINE = 1 -}; - -enum -{ - MFX_ROTATION_0 = 0, - MFX_ROTATION_90 = 1, - MFX_ROTATION_180 = 2, - MFX_ROTATION_270 = 3 -}; - -enum { - MFX_EXTBUFF_JPEG_QT = MFX_MAKEFOURCC('J','P','G','Q'), - MFX_EXTBUFF_JPEG_HUFFMAN = MFX_MAKEFOURCC('J','P','G','H') -}; - -enum { - MFX_JPEG_COLORFORMAT_UNKNOWN = 0, - MFX_JPEG_COLORFORMAT_YCbCr = 1, - MFX_JPEG_COLORFORMAT_RGB = 2 -}; - -enum { - MFX_SCANTYPE_UNKNOWN = 0, - MFX_SCANTYPE_INTERLEAVED = 1, - MFX_SCANTYPE_NONINTERLEAVED = 2 -}; - -enum { - MFX_CHROMAFORMAT_JPEG_SAMPLING = 6 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 reserved[7]; - mfxU16 NumTable; - - mfxU16 Qm[4][64]; -} mfxExtJPEGQuantTables; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 reserved[2]; - mfxU16 NumDCTable; - mfxU16 NumACTable; - - struct { - mfxU8 Bits[16]; - mfxU8 Values[12]; - } DCTables[4]; - - struct { - mfxU8 Bits[16]; - mfxU8 Values[162]; - } ACTables[4]; -} mfxExtJPEGHuffmanTables; -MFX_PACK_END() - -#ifdef __cplusplus -} // extern "C" -#endif /* __cplusplus */ - -#endif // __MFX_JPEG_H__ diff --git a/.github/actions/libmfx/include/mfx/mfxla.h b/.github/actions/libmfx/include/mfx/mfxla.h deleted file mode 100644 index 264c72f..0000000 --- a/.github/actions/libmfx/include/mfx/mfxla.h +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2017-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXLA_H__ -#define __MFXLA_H__ -#include "mfxdefs.h" -#include "mfxvstructures.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - - -enum -{ - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_LOOKAHEAD_CTRL) = MFX_MAKEFOURCC('L','A','C','T'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_LOOKAHEAD_STAT) = MFX_MAKEFOURCC('L','A','S','T'), -}; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_LOOKAHEAD_CTRL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_LOOKAHEAD_STAT); - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct -{ - mfxExtBuffer Header; - mfxU16 LookAheadDepth; - mfxU16 DependencyDepth; - mfxU16 DownScaleFactor; - mfxU16 BPyramid; - - mfxU16 reserved1[23]; - - mfxU16 NumOutStream; - struct mfxStream{ - mfxU16 Width; - mfxU16 Height; - mfxU16 reserved2[14]; - } OutStream[16]; -}mfxExtLAControl; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -MFX_DEPRECATED typedef struct -{ - mfxU16 Width; - mfxU16 Height; - - mfxU32 FrameType; - mfxU32 FrameDisplayOrder; - mfxU32 FrameEncodeOrder; - - mfxU32 IntraCost; - mfxU32 InterCost; - mfxU32 DependencyCost; //aggregated cost, how this frame influences subsequent frames - mfxU16 Layer; - mfxU16 reserved[23]; - - mfxU64 EstimatedRate[52]; -}mfxLAFrameInfo; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 reserved[20]; - - mfxU16 NumAlloc; //number of allocated mfxLAFrameInfo structures - mfxU16 NumStream; //number of resolutions - mfxU16 NumFrame; //number of frames for each resolution - mfxLAFrameInfo *FrameStat; //frame statistics - - mfxFrameSurface1 *OutSurface; //reordered surface - -} mfxExtLAFrameStatistics; -MFX_PACK_END() - -#ifdef __cplusplus -} // extern "C" -#endif /* __cplusplus */ - - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxmvc.h b/.github/actions/libmfx/include/mfx/mfxmvc.h deleted file mode 100644 index 8e0c21b..0000000 --- a/.github/actions/libmfx/include/mfx/mfxmvc.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2017-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXMVC_H__ -#define __MFXMVC_H__ - -#include "mfxdefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* CodecProfile, CodecLevel */ -enum { - /* MVC profiles */ - MFX_PROFILE_AVC_MULTIVIEW_HIGH =118, - MFX_PROFILE_AVC_STEREO_HIGH =128 -}; - -/* Extended Buffer Ids */ -enum { - MFX_EXTBUFF_MVC_SEQ_DESC = MFX_MAKEFOURCC('M','V','C','D'), - MFX_EXTBUFF_MVC_TARGET_VIEWS = MFX_MAKEFOURCC('M','V','C','T') -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU16 ViewId; - - mfxU16 NumAnchorRefsL0; - mfxU16 NumAnchorRefsL1; - mfxU16 AnchorRefL0[16]; - mfxU16 AnchorRefL1[16]; - - mfxU16 NumNonAnchorRefsL0; - mfxU16 NumNonAnchorRefsL1; - mfxU16 NonAnchorRefL0[16]; - mfxU16 NonAnchorRefL1[16]; -} mfxMVCViewDependency; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxU16 TemporalId; - mfxU16 LevelIdc; - - mfxU16 NumViews; - mfxU16 NumTargetViews; - mfxU16 *TargetViewId; -} mfxMVCOperationPoint; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; - - mfxU32 NumView; - mfxU32 NumViewAlloc; - mfxMVCViewDependency *View; - - mfxU32 NumViewId; - mfxU32 NumViewIdAlloc; - mfxU16 *ViewId; - - mfxU32 NumOP; - mfxU32 NumOPAlloc; - mfxMVCOperationPoint *OP; - - mfxU16 NumRefsTotal; - mfxU32 Reserved[16]; - -} mfxExtMVCSeqDesc; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 TemporalId; - mfxU32 NumView; - mfxU16 ViewId[1024]; -} mfxExtMVCTargetViews ; -MFX_PACK_END() - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxpak.h b/.github/actions/libmfx/include/mfx/mfxpak.h deleted file mode 100644 index 4810b9a..0000000 --- a/.github/actions/libmfx/include/mfx/mfxpak.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2017-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXPAK_H__ -#define __MFXPAK_H__ -#include "mfxdefs.h" -#include "mfxvstructures.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxU16 reserved[32]; - - mfxFrameSurface1 *InSurface; - - mfxU16 NumFrameL0; - mfxFrameSurface1 **L0Surface; - mfxU16 NumFrameL1; - mfxFrameSurface1 **L1Surface; - - mfxU16 NumExtParam; - mfxExtBuffer **ExtParam; - - mfxU16 NumPayload; - mfxPayload **Payload; -} mfxPAKInput; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxU16 reserved[32]; - - mfxBitstream *Bs; - - mfxFrameSurface1 *OutSurface; - - mfxU16 NumExtParam; - mfxExtBuffer **ExtParam; -} mfxPAKOutput; -MFX_PACK_END() - -typedef struct _mfxSession *mfxSession; -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest request[2]); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_Init(mfxSession session, mfxVideoParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_Reset(mfxSession session, mfxVideoParam *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_Close(mfxSession session); - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_ProcessFrameAsync(mfxSession session, mfxPAKInput *in, mfxPAKOutput *out, mfxSyncPoint *syncp); - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_GetVideoParam(mfxSession session, mfxVideoParam *par); - -#ifdef __cplusplus -} // extern "C" -#endif /* __cplusplus */ - - -#endif diff --git a/.github/actions/libmfx/include/mfx/mfxplugin++.h b/.github/actions/libmfx/include/mfx/mfxplugin++.h deleted file mode 100644 index 43ddd56..0000000 --- a/.github/actions/libmfx/include/mfx/mfxplugin++.h +++ /dev/null @@ -1,717 +0,0 @@ -// Copyright (c) 2017-2020 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#ifndef __MFXPLUGINPLUSPLUS_H -#define __MFXPLUGINPLUSPLUS_H - -#include "mfxplugin.h" - -// base class for MFXVideoUSER/MFXAudioUSER API - -class MFXBaseUSER { -public: - explicit MFXBaseUSER(mfxSession session = NULL) - : m_session(session){} - - virtual ~MFXBaseUSER() {} - - virtual mfxStatus Register(mfxU32 type, const mfxPlugin *par) = 0; - virtual mfxStatus Unregister(mfxU32 type) = 0; - virtual mfxStatus ProcessFrameAsync(const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxSyncPoint *syncp) = 0; - -protected: - mfxSession m_session; -}; - -//c++ wrapper over only 3 exposed functions from MFXVideoUSER module -class MFXVideoUSER: public MFXBaseUSER { -public: - explicit MFXVideoUSER(mfxSession session = NULL) - : MFXBaseUSER(session){} - - virtual mfxStatus Register(mfxU32 type, const mfxPlugin *par) { - return MFXVideoUSER_Register(m_session, type, par); - } - virtual mfxStatus Unregister(mfxU32 type) { - return MFXVideoUSER_Unregister(m_session, type); - } - virtual mfxStatus ProcessFrameAsync(const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxSyncPoint *syncp) { - return MFXVideoUSER_ProcessFrameAsync(m_session, in, in_num, out, out_num, syncp); - } -}; - -//c++ wrapper over only 3 exposed functions from MFXAudioUSER module -class MFXAudioUSER: public MFXBaseUSER { -public: - explicit MFXAudioUSER(mfxSession session = NULL) - : MFXBaseUSER(session){} - - virtual mfxStatus Register(mfxU32 type, const mfxPlugin *par) { - return MFXAudioUSER_Register(m_session, type, par); - } - virtual mfxStatus Unregister(mfxU32 type) { - return MFXAudioUSER_Unregister(m_session, type); - } - virtual mfxStatus ProcessFrameAsync(const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxSyncPoint *syncp) { - return MFXAudioUSER_ProcessFrameAsync(m_session, in, in_num, out, out_num, syncp); - } -}; - - -//initialize mfxPlugin struct -class MFXPluginParam { - mfxPluginParam m_param; - -public: - MFXPluginParam(mfxU32 CodecId, mfxU32 Type, mfxPluginUID uid, mfxThreadPolicy ThreadPolicy = MFX_THREADPOLICY_SERIAL, mfxU32 MaxThreadNum = 1) - : m_param() { - m_param.PluginUID = uid; - m_param.Type = Type; - m_param.CodecId = CodecId; - m_param.MaxThreadNum = MaxThreadNum; - m_param.ThreadPolicy = ThreadPolicy; - } - operator const mfxPluginParam& () const { - return m_param; - } - operator mfxPluginParam& () { - return m_param; - } -}; - -//common interface part for every plugin: decoder/encoder and generic -struct MFXPlugin -{ - virtual ~MFXPlugin() {}; - //init function always required for any transform or codec plugins, for codec plugins it maps to callback from MediaSDK - //for generic plugin application should call it - //MediaSDK mfxPlugin API mapping - virtual mfxStatus PluginInit(mfxCoreInterface *core) = 0; - //release CoreInterface, and destroy plugin state, not destroy plugin instance - virtual mfxStatus PluginClose() = 0; - virtual mfxStatus GetPluginParam(mfxPluginParam *par) = 0; - virtual mfxStatus Execute(mfxThreadTask task, mfxU32 uid_p, mfxU32 uid_a) = 0; - virtual mfxStatus FreeResources(mfxThreadTask task, mfxStatus sts) = 0; - //destroy plugin due to shared module distribution model plugin wont support virtual destructor - virtual void Release() = 0; - //release resources associated with current instance of plugin, but do not release CoreInterface related resource set in pluginInit - virtual mfxStatus Close() = 0; - //communication protocol between particular version of plugin and application - virtual mfxStatus SetAuxParams(void* auxParam, int auxParamSize) = 0; -}; - -//common extension interface that codec plugins should expose additionally to MFXPlugin -struct MFXCodecPlugin : MFXPlugin -{ - virtual mfxStatus Init(mfxVideoParam *par) = 0; - virtual mfxStatus QueryIOSurf(mfxVideoParam *par, mfxFrameAllocRequest *in, mfxFrameAllocRequest *out) = 0; - virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) =0; - virtual mfxStatus Reset(mfxVideoParam *par) = 0; - virtual mfxStatus GetVideoParam(mfxVideoParam *par) = 0; -}; - -//common extension interface that audio codec plugins should expose additionally to MFXPlugin -struct MFXAudioCodecPlugin : MFXPlugin -{ - virtual mfxStatus Init(mfxAudioParam *par) = 0; - virtual mfxStatus Query(mfxAudioParam *in, mfxAudioParam *out) =0; - virtual mfxStatus QueryIOSize(mfxAudioParam *par, mfxAudioAllocRequest *request) = 0; - virtual mfxStatus Reset(mfxAudioParam *par) = 0; - virtual mfxStatus GetAudioParam(mfxAudioParam *par) = 0; -}; - -//general purpose transform plugin interface, not a codec plugin -struct MFXGenericPlugin : MFXPlugin -{ - virtual mfxStatus Init(mfxVideoParam *par) = 0; - virtual mfxStatus QueryIOSurf(mfxVideoParam *par, mfxFrameAllocRequest *in, mfxFrameAllocRequest *out) = 0; - virtual mfxStatus Submit(const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxThreadTask *task) = 0; -}; - -//decoder plugins may only support this interface -struct MFXDecoderPlugin : MFXCodecPlugin -{ - virtual mfxStatus DecodeHeader(mfxBitstream *bs, mfxVideoParam *par) = 0; - virtual mfxStatus GetPayload(mfxU64 *ts, mfxPayload *payload) = 0; - virtual mfxStatus DecodeFrameSubmit(mfxBitstream *bs, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task) = 0; -}; - -//audio decoder plugins may only support this interface -struct MFXAudioDecoderPlugin : MFXAudioCodecPlugin -{ - virtual mfxStatus DecodeHeader(mfxBitstream *bs, mfxAudioParam *par) = 0; -// virtual mfxStatus GetPayload(mfxU64 *ts, mfxPayload *payload) = 0; - virtual mfxStatus DecodeFrameSubmit(mfxBitstream *in, mfxAudioFrame *out, mfxThreadTask *task) = 0; -}; - -//encoder plugins may only support this interface -struct MFXEncoderPlugin : MFXCodecPlugin -{ - virtual mfxStatus EncodeFrameSubmit(mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxThreadTask *task) = 0; -}; - -//audio encoder plugins may only support this interface -struct MFXAudioEncoderPlugin : MFXAudioCodecPlugin -{ - virtual mfxStatus EncodeFrameSubmit(mfxAudioFrame *aFrame, mfxBitstream *out, mfxThreadTask *task) = 0; -}; - -//vpp plugins may only support this interface -struct MFXVPPPlugin : MFXCodecPlugin -{ - virtual mfxStatus VPPFrameSubmit(mfxFrameSurface1 *surface_in, mfxFrameSurface1 *surface_out, mfxExtVppAuxData *aux, mfxThreadTask *task) = 0; - virtual mfxStatus VPPFrameSubmitEx(mfxFrameSurface1 *in, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task) = 0; -}; - -struct MFXEncPlugin : MFXCodecPlugin -{ - virtual mfxStatus EncFrameSubmit(mfxENCInput *in, mfxENCOutput *out, mfxThreadTask *task) = 0; -}; - - - - -class MFXCoreInterface -{ -protected: - mfxCoreInterface m_core; -public: - - MFXCoreInterface() - : m_core() { - } - MFXCoreInterface(const mfxCoreInterface & pCore) - : m_core(pCore) { - } - - MFXCoreInterface(const MFXCoreInterface & that) - : m_core(that.m_core) { - } - MFXCoreInterface &operator = (const MFXCoreInterface & that) - { - m_core = that.m_core; - return *this; - } - bool IsCoreSet() { - return m_core.pthis != 0; - } - mfxStatus GetCoreParam(mfxCoreParam *par) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.GetCoreParam(m_core.pthis, par); - } - mfxStatus GetHandle (mfxHandleType type, mfxHDL *handle) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.GetHandle(m_core.pthis, type, handle); - } - mfxStatus IncreaseReference (mfxFrameData *fd) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.IncreaseReference(m_core.pthis, fd); - } - mfxStatus DecreaseReference (mfxFrameData *fd) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.DecreaseReference(m_core.pthis, fd); - } - mfxStatus CopyFrame (mfxFrameSurface1 *dst, mfxFrameSurface1 *src) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.CopyFrame(m_core.pthis, dst, src); - } - mfxStatus CopyBuffer(mfxU8 *dst, mfxU32 size, mfxFrameSurface1 *src) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.CopyBuffer(m_core.pthis, dst, size, src); - } - mfxStatus MapOpaqueSurface(mfxU32 num, mfxU32 type, mfxFrameSurface1 **op_surf) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.MapOpaqueSurface(m_core.pthis, num, type, op_surf); - } - mfxStatus UnmapOpaqueSurface(mfxU32 num, mfxU32 type, mfxFrameSurface1 **op_surf) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.UnmapOpaqueSurface(m_core.pthis, num, type, op_surf); - } - mfxStatus GetRealSurface(mfxFrameSurface1 *op_surf, mfxFrameSurface1 **surf) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.GetRealSurface(m_core.pthis, op_surf, surf); - } - mfxStatus GetOpaqueSurface(mfxFrameSurface1 *surf, mfxFrameSurface1 **op_surf) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.GetOpaqueSurface(m_core.pthis, surf, op_surf); - } - mfxStatus CreateAccelerationDevice(mfxHandleType type, mfxHDL *handle) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.CreateAccelerationDevice(m_core.pthis, type, handle); - } - mfxFrameAllocator & FrameAllocator() { - return m_core.FrameAllocator; - } - mfxStatus GetFrameHandle(mfxFrameData *fd, mfxHDL *handle) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.GetFrameHandle(m_core.pthis, fd, handle); - } - mfxStatus QueryPlatform(mfxPlatform *platform) { - if (!IsCoreSet()) { - return MFX_ERR_NULL_PTR; - } - return m_core.QueryPlatform(m_core.pthis, platform); - } -} ; - -/* Class adapter between "C" structure mfxPlugin and C++ interface MFXPlugin */ - -namespace detail -{ - template - class MFXPluginAdapterBase - { - protected: - mfxPlugin m_mfxAPI; - public: - MFXPluginAdapterBase( T *plugin, mfxVideoCodecPlugin *pCodec = NULL) - : m_mfxAPI() - { - SetupCallbacks(plugin, pCodec); - } - - MFXPluginAdapterBase( T *plugin, mfxAudioCodecPlugin *pCodec) - : m_mfxAPI() - { - SetupCallbacks(plugin, pCodec); - } - - operator mfxPlugin () const { - return m_mfxAPI; - } - void SetupCallbacks(T *plugin) { - m_mfxAPI.pthis = plugin; - m_mfxAPI.PluginInit = _PluginInit; - m_mfxAPI.PluginClose = _PluginClose; - m_mfxAPI.GetPluginParam = _GetPluginParam; - m_mfxAPI.Submit = 0; - m_mfxAPI.Execute = _Execute; - m_mfxAPI.FreeResources = _FreeResources; - } - - void SetupCallbacks( T *plugin, mfxVideoCodecPlugin *pCodec) { - SetupCallbacks(plugin); - m_mfxAPI.Video = pCodec; - } - - void SetupCallbacks( T *plugin, mfxAudioCodecPlugin *pCodec) { - SetupCallbacks(plugin); - m_mfxAPI.Audio = pCodec; - } - private: - - static mfxStatus _PluginInit(mfxHDL pthis, mfxCoreInterface *core) { - return reinterpret_cast(pthis)->PluginInit(core); - } - static mfxStatus _PluginClose(mfxHDL pthis) { - return reinterpret_cast(pthis)->PluginClose(); - } - static mfxStatus _GetPluginParam(mfxHDL pthis, mfxPluginParam *par) { - return reinterpret_cast(pthis)->GetPluginParam(par); - } - static mfxStatus _Execute(mfxHDL pthis, mfxThreadTask task, mfxU32 thread_id, mfxU32 call_count) { - return reinterpret_cast(pthis)->Execute(task, thread_id, call_count); - } - static mfxStatus _FreeResources(mfxHDL pthis, mfxThreadTask task, mfxStatus sts) { - return reinterpret_cast(pthis)->FreeResources(task, sts); - } - }; - - template - class MFXCodecPluginAdapterBase : public MFXPluginAdapterBase - { - protected: - //stub to feed mediasdk plugin API - mfxVideoCodecPlugin m_codecPlg; - public: - MFXCodecPluginAdapterBase(T * pCodecPlg) - : MFXPluginAdapterBase(pCodecPlg, &m_codecPlg) - , m_codecPlg() - { - m_codecPlg.Query = _Query; - m_codecPlg.QueryIOSurf = _QueryIOSurf ; - m_codecPlg.Init = _Init; - m_codecPlg.Reset = _Reset; - m_codecPlg.Close = _Close; - m_codecPlg.GetVideoParam = _GetVideoParam; - } - MFXCodecPluginAdapterBase(const MFXCodecPluginAdapterBase & that) - : MFXPluginAdapterBase(reinterpret_cast(that.m_mfxAPI.pthis), &m_codecPlg) - , m_codecPlg() { - SetupCallbacks(); - } - MFXCodecPluginAdapterBase& operator = (const MFXCodecPluginAdapterBase & that) { - MFXPluginAdapterBase :: SetupCallbacks(reinterpret_cast(that.m_mfxAPI.pthis), &m_codecPlg); - SetupCallbacks(); - return *this; - } - - private: - void SetupCallbacks() { - m_codecPlg.Query = _Query; - m_codecPlg.QueryIOSurf = _QueryIOSurf ; - m_codecPlg.Init = _Init; - m_codecPlg.Reset = _Reset; - m_codecPlg.Close = _Close; - m_codecPlg.GetVideoParam = _GetVideoParam; - } - static mfxStatus _Query(mfxHDL pthis, mfxVideoParam *in, mfxVideoParam *out) { - return reinterpret_cast(pthis)->Query(in, out); - } - static mfxStatus _QueryIOSurf(mfxHDL pthis, mfxVideoParam *par, mfxFrameAllocRequest *in, mfxFrameAllocRequest *out){ - return reinterpret_cast(pthis)->QueryIOSurf(par, in, out); - } - static mfxStatus _Init(mfxHDL pthis, mfxVideoParam *par){ - return reinterpret_cast(pthis)->Init(par); - } - static mfxStatus _Reset(mfxHDL pthis, mfxVideoParam *par){ - return reinterpret_cast(pthis)->Reset(par); - } - static mfxStatus _Close(mfxHDL pthis) { - return reinterpret_cast(pthis)->Close(); - } - static mfxStatus _GetVideoParam(mfxHDL pthis, mfxVideoParam *par) { - return reinterpret_cast(pthis)->GetVideoParam(par); - } - }; - - template - class MFXAudioCodecPluginAdapterBase : public MFXPluginAdapterBase - { - protected: - //stub to feed mediasdk plugin API - mfxAudioCodecPlugin m_codecPlg; - public: - MFXAudioCodecPluginAdapterBase(T * pCodecPlg) - : MFXPluginAdapterBase(pCodecPlg, &m_codecPlg) - , m_codecPlg() - { - m_codecPlg.Query = _Query; - m_codecPlg.QueryIOSize = _QueryIOSize ; - m_codecPlg.Init = _Init; - m_codecPlg.Reset = _Reset; - m_codecPlg.Close = _Close; - m_codecPlg.GetAudioParam = _GetAudioParam; - } - MFXAudioCodecPluginAdapterBase(const MFXCodecPluginAdapterBase & that) - : MFXPluginAdapterBase(reinterpret_cast(that.m_mfxAPI.pthis), &m_codecPlg) - , m_codecPlg() { - SetupCallbacks(); - } - MFXAudioCodecPluginAdapterBase& operator = (const MFXAudioCodecPluginAdapterBase & that) { - MFXPluginAdapterBase :: SetupCallbacks(reinterpret_cast(that.m_mfxAPI.pthis), &m_codecPlg); - SetupCallbacks(); - return *this; - } - - private: - void SetupCallbacks() { - m_codecPlg.Query = _Query; - m_codecPlg.QueryIOSize = _QueryIOSize; - m_codecPlg.Init = _Init; - m_codecPlg.Reset = _Reset; - m_codecPlg.Close = _Close; - m_codecPlg.GetAudioParam = _GetAudioParam; - } - static mfxStatus _Query(mfxHDL pthis, mfxAudioParam *in, mfxAudioParam *out) { - return reinterpret_cast(pthis)->Query(in, out); - } - static mfxStatus _QueryIOSize(mfxHDL pthis, mfxAudioParam *par, mfxAudioAllocRequest *request){ - return reinterpret_cast(pthis)->QueryIOSize(par, request); - } - static mfxStatus _Init(mfxHDL pthis, mfxAudioParam *par){ - return reinterpret_cast(pthis)->Init(par); - } - static mfxStatus _Reset(mfxHDL pthis, mfxAudioParam *par){ - return reinterpret_cast(pthis)->Reset(par); - } - static mfxStatus _Close(mfxHDL pthis) { - return reinterpret_cast(pthis)->Close(); - } - static mfxStatus _GetAudioParam(mfxHDL pthis, mfxAudioParam *par) { - return reinterpret_cast(pthis)->GetAudioParam(par); - } - }; - - template - struct MFXPluginAdapterInternal{}; - template<> - class MFXPluginAdapterInternal : public MFXPluginAdapterBase - { - public: - MFXPluginAdapterInternal(MFXGenericPlugin *pPlugin) - : MFXPluginAdapterBase(pPlugin) - { - m_mfxAPI.Submit = _Submit; - } - MFXPluginAdapterInternal(const MFXPluginAdapterInternal & that ) - : MFXPluginAdapterBase(that) { - m_mfxAPI.Submit = that._Submit; - } - MFXPluginAdapterInternal& operator = (const MFXPluginAdapterInternal & that) { - MFXPluginAdapterBase::operator=(that); - m_mfxAPI.Submit = that._Submit; - return *this; - } - - private: - static mfxStatus _Submit(mfxHDL pthis, const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxThreadTask *task) { - return reinterpret_cast(pthis)->Submit(in, in_num, out, out_num, task); - } - }; - - template<> - class MFXPluginAdapterInternal : public MFXCodecPluginAdapterBase - { - public: - MFXPluginAdapterInternal(MFXDecoderPlugin *pPlugin) - : MFXCodecPluginAdapterBase(pPlugin) - { - SetupCallbacks(); - } - - MFXPluginAdapterInternal(const MFXPluginAdapterInternal & that) - : MFXCodecPluginAdapterBase(that) { - SetupCallbacks(); - } - - MFXPluginAdapterInternal& operator = (const MFXPluginAdapterInternal & that) { - MFXCodecPluginAdapterBase::operator=(that); - SetupCallbacks(); - return *this; - } - - private: - void SetupCallbacks() { - m_codecPlg.DecodeHeader = _DecodeHeader; - m_codecPlg.GetPayload = _GetPayload; - m_codecPlg.DecodeFrameSubmit = _DecodeFrameSubmit; - } - static mfxStatus _DecodeHeader(mfxHDL pthis, mfxBitstream *bs, mfxVideoParam *par) { - return reinterpret_cast(pthis)->DecodeHeader(bs, par); - } - static mfxStatus _GetPayload(mfxHDL pthis, mfxU64 *ts, mfxPayload *payload) { - return reinterpret_cast(pthis)->GetPayload(ts, payload); - } - static mfxStatus _DecodeFrameSubmit(mfxHDL pthis, mfxBitstream *bs, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task) { - return reinterpret_cast(pthis)->DecodeFrameSubmit(bs, surface_work, surface_out, task); - } - }; - - template<> - class MFXPluginAdapterInternal : public MFXAudioCodecPluginAdapterBase - { - public: - MFXPluginAdapterInternal(MFXAudioDecoderPlugin *pPlugin) - : MFXAudioCodecPluginAdapterBase(pPlugin) - { - SetupCallbacks(); - } - - MFXPluginAdapterInternal(const MFXPluginAdapterInternal & that) - : MFXAudioCodecPluginAdapterBase(that) { - SetupCallbacks(); - } - - MFXPluginAdapterInternal& operator = (const MFXPluginAdapterInternal & that) { - MFXAudioCodecPluginAdapterBase::operator=(that); - SetupCallbacks(); - return *this; - } - - private: - void SetupCallbacks() { - m_codecPlg.DecodeHeader = _DecodeHeader; - m_codecPlg.DecodeFrameSubmit = _DecodeFrameSubmit; - } - static mfxStatus _DecodeHeader(mfxHDL pthis, mfxBitstream *bs, mfxAudioParam *par) { - return reinterpret_cast(pthis)->DecodeHeader(bs, par); - } - static mfxStatus _DecodeFrameSubmit(mfxHDL pthis, mfxBitstream *in, mfxAudioFrame *out, mfxThreadTask *task) { - return reinterpret_cast(pthis)->DecodeFrameSubmit(in, out, task); - } - }; - - template<> - class MFXPluginAdapterInternal : public MFXCodecPluginAdapterBase - { - public: - MFXPluginAdapterInternal(MFXEncoderPlugin *pPlugin) - : MFXCodecPluginAdapterBase(pPlugin) - { - m_codecPlg.EncodeFrameSubmit = _EncodeFrameSubmit; - } - MFXPluginAdapterInternal(const MFXPluginAdapterInternal & that) - : MFXCodecPluginAdapterBase(that) { - m_codecPlg.EncodeFrameSubmit = _EncodeFrameSubmit; - } - - MFXPluginAdapterInternal& operator = (const MFXPluginAdapterInternal & that) { - MFXCodecPluginAdapterBase::operator = (that); - m_codecPlg.EncodeFrameSubmit = _EncodeFrameSubmit; - return *this; - } - - private: - static mfxStatus _EncodeFrameSubmit(mfxHDL pthis, mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxThreadTask *task) { - return reinterpret_cast(pthis)->EncodeFrameSubmit(ctrl, surface, bs, task); - } - }; - - template<> - class MFXPluginAdapterInternal : public MFXAudioCodecPluginAdapterBase - { - public: - MFXPluginAdapterInternal(MFXAudioEncoderPlugin *pPlugin) - : MFXAudioCodecPluginAdapterBase(pPlugin) - { - SetupCallbacks(); - } - - MFXPluginAdapterInternal(const MFXPluginAdapterInternal & that) - : MFXAudioCodecPluginAdapterBase(that) { - SetupCallbacks(); - } - - MFXPluginAdapterInternal& operator = (const MFXPluginAdapterInternal & that) { - MFXAudioCodecPluginAdapterBase::operator=(that); - SetupCallbacks(); - return *this; - } - - private: - void SetupCallbacks() { - m_codecPlg.EncodeFrameSubmit = _EncodeFrameSubmit; - } - static mfxStatus _EncodeFrameSubmit(mfxHDL pthis, mfxAudioFrame *aFrame, mfxBitstream *out, mfxThreadTask *task) { - return reinterpret_cast(pthis)->EncodeFrameSubmit(aFrame, out, task); - } - }; - - template<> - class MFXPluginAdapterInternal : public MFXCodecPluginAdapterBase - { - public: - MFXPluginAdapterInternal(MFXEncPlugin *pPlugin) - : MFXCodecPluginAdapterBase(pPlugin) - { - m_codecPlg.ENCFrameSubmit = _ENCFrameSubmit; - } - MFXPluginAdapterInternal(const MFXPluginAdapterInternal & that) - : MFXCodecPluginAdapterBase(that) { - m_codecPlg.ENCFrameSubmit = _ENCFrameSubmit; - } - - MFXPluginAdapterInternal& operator = (const MFXPluginAdapterInternal & that) { - MFXCodecPluginAdapterBase::operator = (that); - m_codecPlg.ENCFrameSubmit = _ENCFrameSubmit; - return *this; - } - - private: - static mfxStatus _ENCFrameSubmit(mfxHDL pthis,mfxENCInput *in, mfxENCOutput *out, mfxThreadTask *task) { - return reinterpret_cast(pthis)->EncFrameSubmit(in, out, task); - } - }; - - - template<> - class MFXPluginAdapterInternal : public MFXCodecPluginAdapterBase - { - public: - MFXPluginAdapterInternal(MFXVPPPlugin *pPlugin) - : MFXCodecPluginAdapterBase(pPlugin) - { - SetupCallbacks(); - } - MFXPluginAdapterInternal(const MFXPluginAdapterInternal & that) - : MFXCodecPluginAdapterBase(that) { - SetupCallbacks(); - } - - MFXPluginAdapterInternal& operator = (const MFXPluginAdapterInternal & that) { - MFXCodecPluginAdapterBase::operator = (that); - SetupCallbacks(); - return *this; - } - - private: - void SetupCallbacks() { - m_codecPlg.VPPFrameSubmit = _VPPFrameSubmit; - m_codecPlg.VPPFrameSubmitEx = _VPPFrameSubmitEx; - } - static mfxStatus _VPPFrameSubmit(mfxHDL pthis, mfxFrameSurface1 *surface_in, mfxFrameSurface1 *surface_out, mfxExtVppAuxData *aux, mfxThreadTask *task) { - return reinterpret_cast(pthis)->VPPFrameSubmit(surface_in, surface_out, aux, task); - } - static mfxStatus _VPPFrameSubmitEx(mfxHDL pthis, mfxFrameSurface1 *surface_in, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task) { - return reinterpret_cast(pthis)->VPPFrameSubmitEx(surface_in, surface_work, surface_out, task); - } - }; -} - -/* adapter for particular plugin type*/ -template -class MFXPluginAdapter -{ -public: - detail::MFXPluginAdapterInternal m_Adapter; - - operator mfxPlugin () const { - return m_Adapter.operator mfxPlugin(); - } - - MFXPluginAdapter(T* pPlugin = NULL) - : m_Adapter(pPlugin) - { - } -}; - -template -inline MFXPluginAdapter make_mfx_plugin_adapter(T* pPlugin) { - - MFXPluginAdapter adapt(pPlugin); - return adapt; -} - -#endif // __MFXPLUGINPLUSPLUS_H diff --git a/.github/actions/libmfx/include/mfx/mfxplugin.h b/.github/actions/libmfx/include/mfx/mfxplugin.h deleted file mode 100644 index 085cda7..0000000 --- a/.github/actions/libmfx/include/mfx/mfxplugin.h +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) 2018-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXPLUGIN_H__ -#define __MFXPLUGIN_H__ -#include "mfxvideo.h" -#include "mfxaudio.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU8 Data[16]; -} mfxPluginUID; -MFX_PACK_END() - -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_HEVCD_SW = {{0x15, 0xdd, 0x93, 0x68, 0x25, 0xad, 0x47, 0x5e, 0xa3, 0x4e, 0x35, 0xf3, 0xf5, 0x42, 0x17, 0xa6}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_HEVCD_HW = {{0x33, 0xa6, 0x1c, 0x0b, 0x4c, 0x27, 0x45, 0x4c, 0xa8, 0xd8, 0x5d, 0xde, 0x75, 0x7c, 0x6f, 0x8e}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_HEVCE_SW = {{0x2f, 0xca, 0x99, 0x74, 0x9f, 0xdb, 0x49, 0xae, 0xb1, 0x21, 0xa5, 0xb6, 0x3e, 0xf5, 0x68, 0xf7}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_HEVCE_GACC = {{0xe5, 0x40, 0x0a, 0x06, 0xc7, 0x4d, 0x41, 0xf5, 0xb1, 0x2d, 0x43, 0x0b, 0xba, 0xa2, 0x3d, 0x0b}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_HEVCE_DP_GACC = {{0x2b, 0xad, 0x6f, 0x9d, 0x77, 0x54, 0x41, 0x2d, 0xbf, 0x63, 0x03, 0xed, 0x4b, 0xb5, 0x09, 0x68}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_HEVCE_HW = {{0x6f, 0xad, 0xc7, 0x91, 0xa0, 0xc2, 0xeb, 0x47, 0x9a, 0xb6, 0xdc, 0xd5, 0xea, 0x9d, 0xa3, 0x47}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_VP8D_HW = {{0xf6, 0x22, 0x39, 0x4d, 0x8d, 0x87, 0x45, 0x2f, 0x87, 0x8c, 0x51, 0xf2, 0xfc, 0x9b, 0x41, 0x31}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_VP8E_HW = {{0xbf, 0xfc, 0x51, 0x8c, 0xde, 0x13, 0x4d, 0xf9, 0x8a, 0x96, 0xf4, 0xcf, 0x81, 0x6c, 0x0f, 0xac}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_VP9E_HW = {{0xce, 0x44, 0xef, 0x6f, 0x1a, 0x6d, 0x22, 0x46, 0xb4, 0x12, 0xbb, 0x38, 0xd6, 0xe4, 0x51, 0x82}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_VP9D_HW = {{0xa9, 0x22, 0x39, 0x4d, 0x8d, 0x87, 0x45, 0x2f, 0x87, 0x8c, 0x51, 0xf2, 0xfc, 0x9b, 0x41, 0x31}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_CAMERA_HW = {{0x54, 0x54, 0x26, 0x16, 0x24, 0x33, 0x41, 0xe6, 0x93, 0xae, 0x89, 0x99, 0x42, 0xce, 0x73, 0x55}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_CAPTURE_HW = {{0x22, 0xd6, 0x2c, 0x07, 0xe6, 0x72, 0x40, 0x8f, 0xbb, 0x4c, 0xc2, 0x0e, 0xd7, 0xa0, 0x53, 0xe4}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_ITELECINE_HW = {{0xe7, 0x44, 0x75, 0x3a, 0xcd, 0x74, 0x40, 0x2e, 0x89, 0xa2, 0xee, 0x06, 0x35, 0x49, 0x61, 0x79}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_H264LA_HW = {{0x58, 0x8f, 0x11, 0x85, 0xd4, 0x7b, 0x42, 0x96, 0x8d, 0xea, 0x37, 0x7b, 0xb5, 0xd0, 0xdc, 0xb4}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_AACD = {{0xe9, 0x34, 0x67, 0x25, 0xac, 0x2f, 0x4c, 0x93, 0xaa, 0x58, 0x5c, 0x11, 0xc7, 0x08, 0x7c, 0xf4}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_AACE = {{0xb2, 0xa2, 0xa0, 0x5a, 0x4e, 0xac, 0x46, 0xbf, 0xa9, 0xde, 0x7e, 0x80, 0xc9, 0x8d, 0x2e, 0x18}}; -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_HEVCE_FEI_HW = {{0x87, 0xe0, 0xe8, 0x02, 0x07, 0x37, 0x52, 0x40, 0x85, 0x25, 0x15, 0xcf, 0x4a, 0x5e, 0xdd, 0xe6}}; -#if (MFX_VERSION >= 1027) -MFX_DEPRECATED static const mfxPluginUID MFX_PLUGINID_HEVC_FEI_ENCODE = {{0x54, 0x18, 0xa7, 0x06, 0x66, 0xf9, 0x4d, 0x5c, 0xb4, 0xf7, 0xb1, 0xca, 0xee, 0x86, 0x33, 0x9b}}; -#endif - - -typedef enum { - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_GENERAL) = 0, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_DECODE) = 1, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_ENCODE) = 2, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_VPP) = 3, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_ENC) = 4, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_AUDIO_DECODE) = 5, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_AUDIO_ENCODE) = 6 -} mfxPluginType; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_GENERAL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_DECODE); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_ENCODE); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_VPP); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_ENC); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_AUDIO_DECODE); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_AUDIO_ENCODE); - -typedef enum { - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_THREADPOLICY_SERIAL) = 0, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_THREADPOLICY_PARALLEL) = 1 -} mfxThreadPolicy; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_THREADPOLICY_SERIAL); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_THREADPOLICY_PARALLEL); - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct mfxPluginParam { - mfxU32 reserved[6]; - mfxU16 reserved1; - mfxU16 PluginVersion; - mfxVersion APIVersion; - mfxPluginUID PluginUID; - mfxU32 Type; - mfxU32 CodecId; - mfxThreadPolicy ThreadPolicy; - mfxU32 MaxThreadNum; -} mfxPluginParam; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct mfxCoreParam{ - mfxU32 reserved[13]; - mfxIMPL Impl; - mfxVersion Version; - mfxU32 NumWorkingThread; -} mfxCoreParam; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct mfxCoreInterface { - mfxHDL pthis; - - mfxHDL reserved1[2]; - mfxFrameAllocator FrameAllocator; - mfxBufferAllocator reserved3; - - mfxStatus (MFX_CDECL *GetCoreParam)(mfxHDL pthis, mfxCoreParam *par); - mfxStatus (MFX_CDECL *GetHandle) (mfxHDL pthis, mfxHandleType type, mfxHDL *handle); - mfxStatus (MFX_CDECL *IncreaseReference) (mfxHDL pthis, mfxFrameData *fd); - mfxStatus (MFX_CDECL *DecreaseReference) (mfxHDL pthis, mfxFrameData *fd); - mfxStatus (MFX_CDECL *CopyFrame) (mfxHDL pthis, mfxFrameSurface1 *dst, mfxFrameSurface1 *src); - mfxStatus (MFX_CDECL *CopyBuffer)(mfxHDL pthis, mfxU8 *dst, mfxU32 size, mfxFrameSurface1 *src); - - mfxStatus (MFX_CDECL *MapOpaqueSurface)(mfxHDL pthis, mfxU32 num, mfxU32 type, mfxFrameSurface1 **op_surf); - mfxStatus (MFX_CDECL *UnmapOpaqueSurface)(mfxHDL pthis, mfxU32 num, mfxU32 type, mfxFrameSurface1 **op_surf); - - mfxStatus (MFX_CDECL *GetRealSurface)(mfxHDL pthis, mfxFrameSurface1 *op_surf, mfxFrameSurface1 **surf); - mfxStatus (MFX_CDECL *GetOpaqueSurface)(mfxHDL pthis, mfxFrameSurface1 *surf, mfxFrameSurface1 **op_surf); - - mfxStatus (MFX_CDECL *CreateAccelerationDevice)(mfxHDL pthis, mfxHandleType type, mfxHDL *handle); - mfxStatus (MFX_CDECL *GetFrameHandle) (mfxHDL pthis, mfxFrameData *fd, mfxHDL *handle); - mfxStatus (MFX_CDECL *QueryPlatform) (mfxHDL pthis, mfxPlatform *platform); - - mfxHDL reserved4[1]; -} mfxCoreInterface; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -/* video codec plugin extension */ -MFX_DEPRECATED typedef struct _mfxENCInput mfxENCInput; -MFX_DEPRECATED typedef struct _mfxENCOutput mfxENCOutput; -MFX_DEPRECATED typedef struct mfxVideoCodecPlugin{ - mfxStatus (MFX_CDECL *Query)(mfxHDL pthis, mfxVideoParam *in, mfxVideoParam *out); - mfxStatus (MFX_CDECL *QueryIOSurf)(mfxHDL pthis, mfxVideoParam *par, mfxFrameAllocRequest *in, mfxFrameAllocRequest *out); - mfxStatus (MFX_CDECL *Init)(mfxHDL pthis, mfxVideoParam *par); - mfxStatus (MFX_CDECL *Reset)(mfxHDL pthis, mfxVideoParam *par); - mfxStatus (MFX_CDECL *Close)(mfxHDL pthis); - mfxStatus (MFX_CDECL *GetVideoParam)(mfxHDL pthis, mfxVideoParam *par); - - mfxStatus (MFX_CDECL *EncodeFrameSubmit)(mfxHDL pthis, mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxThreadTask *task); - - mfxStatus (MFX_CDECL *DecodeHeader)(mfxHDL pthis, mfxBitstream *bs, mfxVideoParam *par); - mfxStatus (MFX_CDECL *GetPayload)(mfxHDL pthis, mfxU64 *ts, mfxPayload *payload); - mfxStatus (MFX_CDECL *DecodeFrameSubmit)(mfxHDL pthis, mfxBitstream *bs, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task); - - mfxStatus (MFX_CDECL *VPPFrameSubmit)(mfxHDL pthis, mfxFrameSurface1 *in, mfxFrameSurface1 *out, mfxExtVppAuxData *aux, mfxThreadTask *task); - mfxStatus (MFX_CDECL *VPPFrameSubmitEx)(mfxHDL pthis, mfxFrameSurface1 *in, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task); - - mfxStatus (MFX_CDECL *ENCFrameSubmit)(mfxHDL pthis, mfxENCInput *in, mfxENCOutput *out, mfxThreadTask *task); - - mfxHDL reserved1[3]; - mfxU32 reserved2[8]; -} mfxVideoCodecPlugin; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct mfxAudioCodecPlugin{ - mfxStatus (MFX_CDECL *Query)(mfxHDL pthis, mfxAudioParam *in, mfxAudioParam *out); - mfxStatus (MFX_CDECL *QueryIOSize)(mfxHDL pthis, mfxAudioParam *par, mfxAudioAllocRequest *request); - mfxStatus (MFX_CDECL *Init)(mfxHDL pthis, mfxAudioParam *par); - mfxStatus (MFX_CDECL *Reset)(mfxHDL pthis, mfxAudioParam *par); - mfxStatus (MFX_CDECL *Close)(mfxHDL pthis); - mfxStatus (MFX_CDECL *GetAudioParam)(mfxHDL pthis, mfxAudioParam *par); - - mfxStatus (MFX_CDECL *EncodeFrameSubmit)(mfxHDL pthis, mfxAudioFrame *aFrame, mfxBitstream *out, mfxThreadTask *task); - - mfxStatus (MFX_CDECL *DecodeHeader)(mfxHDL pthis, mfxBitstream *bs, mfxAudioParam *par); -// mfxStatus (MFX_CDECL *GetPayload)(mfxHDL pthis, mfxU64 *ts, mfxPayload *payload); - mfxStatus (MFX_CDECL *DecodeFrameSubmit)(mfxHDL pthis, mfxBitstream *in, mfxAudioFrame *out, mfxThreadTask *task); - - mfxHDL reserved1[6]; - mfxU32 reserved2[8]; -} mfxAudioCodecPlugin; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct mfxPlugin{ - mfxHDL pthis; - - mfxStatus (MFX_CDECL *PluginInit) (mfxHDL pthis, mfxCoreInterface *core); - mfxStatus (MFX_CDECL *PluginClose) (mfxHDL pthis); - - mfxStatus (MFX_CDECL *GetPluginParam)(mfxHDL pthis, mfxPluginParam *par); - - mfxStatus (MFX_CDECL *Submit)(mfxHDL pthis, const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxThreadTask *task); - mfxStatus (MFX_CDECL *Execute)(mfxHDL pthis, mfxThreadTask task, mfxU32 uid_p, mfxU32 uid_a); - mfxStatus (MFX_CDECL *FreeResources)(mfxHDL pthis, mfxThreadTask task, mfxStatus sts); - - union { - mfxVideoCodecPlugin *Video; - mfxAudioCodecPlugin *Audio; - }; - - mfxHDL reserved[8]; -} mfxPlugin; -MFX_PACK_END() - - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_Register(mfxSession session, mfxU32 type, const mfxPlugin *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_Unregister(mfxSession session, mfxU32 type); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_GetPlugin(mfxSession session, mfxU32 type, mfxPlugin *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_ProcessFrameAsync(mfxSession session, const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxSyncPoint *syncp); - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_Load(mfxSession session, const mfxPluginUID *uid, mfxU32 version); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_LoadByPath(mfxSession session, const mfxPluginUID *uid, mfxU32 version, const mfxChar *path, mfxU32 len); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_UnLoad(mfxSession session, const mfxPluginUID *uid); - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioUSER_Register(mfxSession session, mfxU32 type, const mfxPlugin *par); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioUSER_Unregister(mfxSession session, mfxU32 type); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioUSER_ProcessFrameAsync(mfxSession session, const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxSyncPoint *syncp); - -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioUSER_Load(mfxSession session, const mfxPluginUID *uid, mfxU32 version); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioUSER_UnLoad(mfxSession session, const mfxPluginUID *uid); - -#ifdef __cplusplus -} // extern "C" -#endif /* __cplusplus */ - -#endif /* __MFXPLUGIN_H__ */ diff --git a/.github/actions/libmfx/include/mfx/mfxsc.h b/.github/actions/libmfx/include/mfx/mfxsc.h deleted file mode 100644 index a4e7dc5..0000000 --- a/.github/actions/libmfx/include/mfx/mfxsc.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2018-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXSC_H__ -#define __MFXSC_H__ -#include "mfxdefs.h" -#include "mfxvstructures.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Extended Buffer Ids */ -enum -{ - MFX_EXTBUFF_SCREEN_CAPTURE_PARAM = MFX_MAKEFOURCC('S','C','P','A') -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct -{ - mfxExtBuffer Header; - - mfxU32 DisplayIndex; - mfxU16 EnableDirtyRect; - mfxU16 EnableCursorCapture; - mfxU16 reserved[24]; -} mfxExtScreenCaptureParam; -MFX_PACK_END() - -#ifdef __cplusplus -} // extern "C" -#endif /* __cplusplus */ - - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxsession.h b/.github/actions/libmfx/include/mfx/mfxsession.h deleted file mode 100644 index 536dc47..0000000 --- a/.github/actions/libmfx/include/mfx/mfxsession.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2017 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXSESSION_H__ -#define __MFXSESSION_H__ -#include "mfxcommon.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -/* Global Functions */ -typedef struct _mfxSession *mfxSession; -mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session); -mfxStatus MFX_CDECL MFXInitEx(mfxInitParam par, mfxSession *session); -mfxStatus MFX_CDECL MFXClose(mfxSession session); - -mfxStatus MFX_CDECL MFXQueryIMPL(mfxSession session, mfxIMPL *impl); -mfxStatus MFX_CDECL MFXQueryVersion(mfxSession session, mfxVersion *version); - -mfxStatus MFX_CDECL MFXJoinSession(mfxSession session, mfxSession child); -mfxStatus MFX_CDECL MFXDisjoinSession(mfxSession session); -mfxStatus MFX_CDECL MFXCloneSession(mfxSession session, mfxSession *clone); -mfxStatus MFX_CDECL MFXSetPriority(mfxSession session, mfxPriority priority); -mfxStatus MFX_CDECL MFXGetPriority(mfxSession session, mfxPriority *priority); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXDoWork(mfxSession session); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxstructures.h b/.github/actions/libmfx/include/mfx/mfxstructures.h deleted file mode 100644 index 1351585..0000000 --- a/.github/actions/libmfx/include/mfx/mfxstructures.h +++ /dev/null @@ -1,2521 +0,0 @@ -// Copyright (c) 2018-2020 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXSTRUCTURES_H__ -#define __MFXSTRUCTURES_H__ -#include "mfxcommon.h" - -#if !defined (__GNUC__) -#pragma warning(disable: 4201) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Frame ID for SVC and MVC */ -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU16 TemporalId; - mfxU16 PriorityId; - union { - struct { - mfxU16 DependencyId; - mfxU16 QualityId; - }; - struct { - mfxU16 ViewId; - }; - }; -} mfxFrameId; -MFX_PACK_END() - -/* This struct has 4-byte alignment for binary compatibility with previously released versions of API */ -MFX_PACK_BEGIN_USUAL_STRUCT() -/* Frame Info */ -typedef struct { - mfxU32 reserved[4]; - mfxU16 reserved4; - mfxU16 BitDepthLuma; - mfxU16 BitDepthChroma; - mfxU16 Shift; - - mfxFrameId FrameId; - - mfxU32 FourCC; - union { - struct { /* Frame parameters */ - mfxU16 Width; - mfxU16 Height; - - mfxU16 CropX; - mfxU16 CropY; - mfxU16 CropW; - mfxU16 CropH; - }; - struct { /* Buffer parameters (for plain formats like P8) */ - mfxU64 BufferSize; - mfxU32 reserved5; - }; - }; - - mfxU32 FrameRateExtN; - mfxU32 FrameRateExtD; - mfxU16 reserved3; - - mfxU16 AspectRatioW; - mfxU16 AspectRatioH; - - mfxU16 PicStruct; - mfxU16 ChromaFormat; - mfxU16 reserved2; -} mfxFrameInfo; -MFX_PACK_END() - -/* FourCC */ -enum { - MFX_FOURCC_NV12 = MFX_MAKEFOURCC('N','V','1','2'), /* Native Format */ - MFX_FOURCC_YV12 = MFX_MAKEFOURCC('Y','V','1','2'), - MFX_FOURCC_NV16 = MFX_MAKEFOURCC('N','V','1','6'), - MFX_FOURCC_YUY2 = MFX_MAKEFOURCC('Y','U','Y','2'), -#if (MFX_VERSION >= 1028) - MFX_FOURCC_RGB565 = MFX_MAKEFOURCC('R','G','B','2'), /* 2 bytes per pixel, uint16 in little-endian format, where 0-4 bits are blue, bits 5-10 are green and bits 11-15 are red */ - MFX_FOURCC_RGBP = MFX_MAKEFOURCC('R','G','B','P'), -#endif - MFX_FOURCC_RGB3 = MFX_MAKEFOURCC('R','G','B','3'), /* deprecated */ - MFX_FOURCC_RGB4 = MFX_MAKEFOURCC('R','G','B','4'), /* ARGB in that order, A channel is 8 MSBs */ - MFX_FOURCC_P8 = 41, /* D3DFMT_P8 */ - MFX_FOURCC_P8_TEXTURE = MFX_MAKEFOURCC('P','8','M','B'), - MFX_FOURCC_P010 = MFX_MAKEFOURCC('P','0','1','0'), -#if (MFX_VERSION >= 1031) - MFX_FOURCC_P016 = MFX_MAKEFOURCC('P','0','1','6'), -#endif - MFX_FOURCC_P210 = MFX_MAKEFOURCC('P','2','1','0'), - MFX_FOURCC_BGR4 = MFX_MAKEFOURCC('B','G','R','4'), /* ABGR in that order, A channel is 8 MSBs */ - MFX_FOURCC_A2RGB10 = MFX_MAKEFOURCC('R','G','1','0'), /* ARGB in that order, A channel is two MSBs */ - MFX_FOURCC_ARGB16 = MFX_MAKEFOURCC('R','G','1','6'), /* ARGB in that order, 64 bits, A channel is 16 MSBs */ - MFX_FOURCC_ABGR16 = MFX_MAKEFOURCC('B','G','1','6'), /* ABGR in that order, 64 bits, A channel is 16 MSBs */ - MFX_FOURCC_R16 = MFX_MAKEFOURCC('R','1','6','U'), - MFX_FOURCC_AYUV = MFX_MAKEFOURCC('A','Y','U','V'), /* YUV 4:4:4, AYUV in that order, A channel is 8 MSBs */ - MFX_FOURCC_AYUV_RGB4 = MFX_MAKEFOURCC('A','V','U','Y'), /* ARGB in that order, A channel is 8 MSBs stored in AYUV surface*/ - MFX_FOURCC_UYVY = MFX_MAKEFOURCC('U','Y','V','Y'), -#if (MFX_VERSION >= 1027) - MFX_FOURCC_Y210 = MFX_MAKEFOURCC('Y','2','1','0'), - MFX_FOURCC_Y410 = MFX_MAKEFOURCC('Y','4','1','0'), -#endif -#if (MFX_VERSION >= 1031) - MFX_FOURCC_Y216 = MFX_MAKEFOURCC('Y','2','1','6'), - MFX_FOURCC_Y416 = MFX_MAKEFOURCC('Y','4','1','6'), -#endif - MFX_FOURCC_NV21 = MFX_MAKEFOURCC('N', 'V', '2', '1'), /* Same as NV12 but with weaved V and U values. */ - MFX_FOURCC_IYUV = MFX_MAKEFOURCC('I', 'Y', 'U', 'V'), /* Same as YV12 except that the U and V plane order is reversed. */ - MFX_FOURCC_I010 = MFX_MAKEFOURCC('I', '0', '1', '0'), /* 10-bit YUV 4:2:0, each component has its own plane. */ -}; - -/* PicStruct */ -enum { - MFX_PICSTRUCT_UNKNOWN =0x00, - MFX_PICSTRUCT_PROGRESSIVE =0x01, - MFX_PICSTRUCT_FIELD_TFF =0x02, - MFX_PICSTRUCT_FIELD_BFF =0x04, - - MFX_PICSTRUCT_FIELD_REPEATED=0x10, /* first field repeated, pic_struct=5 or 6 in H.264 */ - MFX_PICSTRUCT_FRAME_DOUBLING=0x20, /* pic_struct=7 in H.264 */ - MFX_PICSTRUCT_FRAME_TRIPLING=0x40, /* pic_struct=8 in H.264 */ - - MFX_PICSTRUCT_FIELD_SINGLE =0x100, - MFX_PICSTRUCT_FIELD_TOP =MFX_PICSTRUCT_FIELD_SINGLE | MFX_PICSTRUCT_FIELD_TFF, - MFX_PICSTRUCT_FIELD_BOTTOM =MFX_PICSTRUCT_FIELD_SINGLE | MFX_PICSTRUCT_FIELD_BFF, - MFX_PICSTRUCT_FIELD_PAIRED_PREV =0x200, - MFX_PICSTRUCT_FIELD_PAIRED_NEXT =0x400, -}; - -/* ColorFormat */ -enum { - MFX_CHROMAFORMAT_MONOCHROME =0, - MFX_CHROMAFORMAT_YUV420 =1, - MFX_CHROMAFORMAT_YUV422 =2, - MFX_CHROMAFORMAT_YUV444 =3, - MFX_CHROMAFORMAT_YUV400 = MFX_CHROMAFORMAT_MONOCHROME, - MFX_CHROMAFORMAT_YUV411 = 4, - MFX_CHROMAFORMAT_YUV422H = MFX_CHROMAFORMAT_YUV422, - MFX_CHROMAFORMAT_YUV422V = 5, - MFX_CHROMAFORMAT_RESERVED1 = 6 -}; - -enum { - MFX_TIMESTAMP_UNKNOWN = -1 -}; - -enum { - MFX_FRAMEORDER_UNKNOWN = -1 -}; - -/* DataFlag in mfxFrameData */ -enum { - MFX_FRAMEDATA_ORIGINAL_TIMESTAMP = 0x0001 -}; - -/* Corrupted in mfxFrameData */ -enum { - MFX_CORRUPTION_MINOR = 0x0001, - MFX_CORRUPTION_MAJOR = 0x0002, - MFX_CORRUPTION_ABSENT_TOP_FIELD = 0x0004, - MFX_CORRUPTION_ABSENT_BOTTOM_FIELD = 0x0008, - MFX_CORRUPTION_REFERENCE_FRAME = 0x0010, - MFX_CORRUPTION_REFERENCE_LIST = 0x0020 -}; - -#if (MFX_VERSION >= 1027) -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct -{ - mfxU32 U : 10; - mfxU32 Y : 10; - mfxU32 V : 10; - mfxU32 A : 2; -} mfxY410; -MFX_PACK_END() -#endif - -#if (MFX_VERSION >= 1025) -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct -{ - mfxU32 B : 10; - mfxU32 G : 10; - mfxU32 R : 10; - mfxU32 A : 2; -} mfxA2RGB10; -MFX_PACK_END() -#endif - -/* Frame Data Info */ -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - union { - mfxExtBuffer **ExtParam; - mfxU64 reserved2; - }; - mfxU16 NumExtParam; - - mfxU16 reserved[9]; - mfxU16 MemType; - mfxU16 PitchHigh; - - mfxU64 TimeStamp; - mfxU32 FrameOrder; - mfxU16 Locked; - union{ - mfxU16 Pitch; - mfxU16 PitchLow; - }; - - /* color planes */ - union { - mfxU8 *Y; - mfxU16 *Y16; - mfxU8 *R; - }; - union { - mfxU8 *UV; /* for UV merged formats */ - mfxU8 *VU; /* for VU merged formats */ - mfxU8 *CbCr; /* for CbCr merged formats */ - mfxU8 *CrCb; /* for CrCb merged formats */ - mfxU8 *Cb; - mfxU8 *U; - mfxU16 *U16; - mfxU8 *G; -#if (MFX_VERSION >= 1027) - mfxY410 *Y410; /* for Y410 format (merged AVYU) */ -#endif - }; - union { - mfxU8 *Cr; - mfxU8 *V; - mfxU16 *V16; - mfxU8 *B; -#if (MFX_VERSION >= 1025) - mfxA2RGB10 *A2RGB10; /* for A2RGB10 format (merged ARGB) */ -#endif - }; - mfxU8 *A; - mfxMemId MemId; - - /* Additional Flags */ - mfxU16 Corrupted; - mfxU16 DataFlag; -} mfxFrameData; -MFX_PACK_END() - -/* Frame Surface */ -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxU32 reserved[4]; - mfxFrameInfo Info; - mfxFrameData Data; -} mfxFrameSurface1; -MFX_PACK_END() - -enum { - MFX_TIMESTAMPCALC_UNKNOWN = 0, - MFX_TIMESTAMPCALC_TELECINE = 1, -}; - -/* Transcoding Info */ -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU32 reserved[7]; - - mfxU16 LowPower; - mfxU16 BRCParamMultiplier; - - mfxFrameInfo FrameInfo; - mfxU32 CodecId; - mfxU16 CodecProfile; - mfxU16 CodecLevel; - mfxU16 NumThread; - - union { - struct { /* Encoding Options */ - mfxU16 TargetUsage; - - mfxU16 GopPicSize; - mfxU16 GopRefDist; - mfxU16 GopOptFlag; - mfxU16 IdrInterval; - - mfxU16 RateControlMethod; - union { - mfxU16 InitialDelayInKB; - mfxU16 QPI; - mfxU16 Accuracy; - }; - mfxU16 BufferSizeInKB; - union { - mfxU16 TargetKbps; - mfxU16 QPP; - mfxU16 ICQQuality; - }; - union { - mfxU16 MaxKbps; - mfxU16 QPB; - mfxU16 Convergence; - }; - - mfxU16 NumSlice; - mfxU16 NumRefFrame; - mfxU16 EncodedOrder; - }; - struct { /* Decoding Options */ - mfxU16 DecodedOrder; - mfxU16 ExtendedPicStruct; - mfxU16 TimeStampCalc; - mfxU16 SliceGroupsPresent; - mfxU16 MaxDecFrameBuffering; - mfxU16 EnableReallocRequest; -#if (MFX_VERSION >= 1034) - mfxU16 FilmGrain; - mfxU16 IgnoreLevelConstrain; - mfxU16 reserved2[5]; -#else - mfxU16 reserved2[7]; -#endif - }; - struct { /* JPEG Decoding Options */ - mfxU16 JPEGChromaFormat; - mfxU16 Rotation; - mfxU16 JPEGColorFormat; - mfxU16 InterleavedDec; - mfxU8 SamplingFactorH[4]; - mfxU8 SamplingFactorV[4]; - mfxU16 reserved3[5]; - }; - struct { /* JPEG Encoding Options */ - mfxU16 Interleaved; - mfxU16 Quality; - mfxU16 RestartInterval; - mfxU16 reserved5[10]; - }; - }; -} mfxInfoMFX; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU32 reserved[8]; - mfxFrameInfo In; - mfxFrameInfo Out; -} mfxInfoVPP; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxU32 AllocId; - mfxU32 reserved[2]; - mfxU16 reserved3; - mfxU16 AsyncDepth; - - union { - mfxInfoMFX mfx; - mfxInfoVPP vpp; - }; - mfxU16 Protected; - mfxU16 IOPattern; - mfxExtBuffer** ExtParam; - mfxU16 NumExtParam; - mfxU16 reserved2; -} mfxVideoParam; -MFX_PACK_END() - -/* IOPattern */ -enum { - MFX_IOPATTERN_IN_VIDEO_MEMORY = 0x01, - MFX_IOPATTERN_IN_SYSTEM_MEMORY = 0x02, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_IOPATTERN_IN_OPAQUE_MEMORY) = 0x04, - MFX_IOPATTERN_OUT_VIDEO_MEMORY = 0x10, - MFX_IOPATTERN_OUT_SYSTEM_MEMORY = 0x20, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_IOPATTERN_OUT_OPAQUE_MEMORY) = 0x40 -}; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_IOPATTERN_IN_OPAQUE_MEMORY); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_IOPATTERN_OUT_OPAQUE_MEMORY); - -/* CodecId */ -enum { - MFX_CODEC_AVC =MFX_MAKEFOURCC('A','V','C',' '), - MFX_CODEC_HEVC =MFX_MAKEFOURCC('H','E','V','C'), - MFX_CODEC_MPEG2 =MFX_MAKEFOURCC('M','P','G','2'), - MFX_CODEC_VC1 =MFX_MAKEFOURCC('V','C','1',' '), - MFX_CODEC_CAPTURE =MFX_MAKEFOURCC('C','A','P','T'), - MFX_CODEC_VP9 =MFX_MAKEFOURCC('V','P','9',' '), - MFX_CODEC_AV1 =MFX_MAKEFOURCC('A','V','1',' ') -}; - -/* CodecProfile, CodecLevel */ -enum { - MFX_PROFILE_UNKNOWN =0, - MFX_LEVEL_UNKNOWN =0, - - /* AVC Profiles & Levels */ - MFX_PROFILE_AVC_CONSTRAINT_SET0 = (0x100 << 0), - MFX_PROFILE_AVC_CONSTRAINT_SET1 = (0x100 << 1), - MFX_PROFILE_AVC_CONSTRAINT_SET2 = (0x100 << 2), - MFX_PROFILE_AVC_CONSTRAINT_SET3 = (0x100 << 3), - MFX_PROFILE_AVC_CONSTRAINT_SET4 = (0x100 << 4), - MFX_PROFILE_AVC_CONSTRAINT_SET5 = (0x100 << 5), - - MFX_PROFILE_AVC_BASELINE =66, - MFX_PROFILE_AVC_MAIN =77, - MFX_PROFILE_AVC_EXTENDED =88, - MFX_PROFILE_AVC_HIGH =100, - MFX_PROFILE_AVC_HIGH10 =110, - MFX_PROFILE_AVC_HIGH_422 =122, - MFX_PROFILE_AVC_CONSTRAINED_BASELINE =MFX_PROFILE_AVC_BASELINE + MFX_PROFILE_AVC_CONSTRAINT_SET1, - MFX_PROFILE_AVC_CONSTRAINED_HIGH =MFX_PROFILE_AVC_HIGH + MFX_PROFILE_AVC_CONSTRAINT_SET4 - + MFX_PROFILE_AVC_CONSTRAINT_SET5, - MFX_PROFILE_AVC_PROGRESSIVE_HIGH =MFX_PROFILE_AVC_HIGH + MFX_PROFILE_AVC_CONSTRAINT_SET4, - - MFX_LEVEL_AVC_1 =10, - MFX_LEVEL_AVC_1b =9, - MFX_LEVEL_AVC_11 =11, - MFX_LEVEL_AVC_12 =12, - MFX_LEVEL_AVC_13 =13, - MFX_LEVEL_AVC_2 =20, - MFX_LEVEL_AVC_21 =21, - MFX_LEVEL_AVC_22 =22, - MFX_LEVEL_AVC_3 =30, - MFX_LEVEL_AVC_31 =31, - MFX_LEVEL_AVC_32 =32, - MFX_LEVEL_AVC_4 =40, - MFX_LEVEL_AVC_41 =41, - MFX_LEVEL_AVC_42 =42, - MFX_LEVEL_AVC_5 =50, - MFX_LEVEL_AVC_51 =51, - MFX_LEVEL_AVC_52 =52, -#if (MFX_VERSION >= 1035) - MFX_LEVEL_AVC_6 =60, - MFX_LEVEL_AVC_61 =61, - MFX_LEVEL_AVC_62 =62, -#endif - - /* MPEG-2 Profiles & Levels */ - MFX_PROFILE_MPEG2_SIMPLE =0x50, - MFX_PROFILE_MPEG2_MAIN =0x40, - MFX_PROFILE_MPEG2_HIGH =0x10, - - MFX_LEVEL_MPEG2_LOW =0xA, - MFX_LEVEL_MPEG2_MAIN =0x8, - MFX_LEVEL_MPEG2_HIGH =0x4, - MFX_LEVEL_MPEG2_HIGH1440 =0x6, - - /* VC1 Profiles & Levels */ - MFX_PROFILE_VC1_SIMPLE =(0+1), - MFX_PROFILE_VC1_MAIN =(4+1), - MFX_PROFILE_VC1_ADVANCED =(12+1), - - /* VC1 levels for simple & main profiles */ - MFX_LEVEL_VC1_LOW =(0+1), - MFX_LEVEL_VC1_MEDIAN =(2+1), - MFX_LEVEL_VC1_HIGH =(4+1), - - /* VC1 levels for the advanced profile */ - MFX_LEVEL_VC1_0 =(0x00+1), - MFX_LEVEL_VC1_1 =(0x01+1), - MFX_LEVEL_VC1_2 =(0x02+1), - MFX_LEVEL_VC1_3 =(0x03+1), - MFX_LEVEL_VC1_4 =(0x04+1), - - /* HEVC Profiles & Levels & Tiers */ - MFX_PROFILE_HEVC_MAIN =1, - MFX_PROFILE_HEVC_MAIN10 =2, - MFX_PROFILE_HEVC_MAINSP =3, - MFX_PROFILE_HEVC_REXT =4, -#if (MFX_VERSION >= 1032) - MFX_PROFILE_HEVC_SCC =9, -#endif - - MFX_LEVEL_HEVC_1 = 10, - MFX_LEVEL_HEVC_2 = 20, - MFX_LEVEL_HEVC_21 = 21, - MFX_LEVEL_HEVC_3 = 30, - MFX_LEVEL_HEVC_31 = 31, - MFX_LEVEL_HEVC_4 = 40, - MFX_LEVEL_HEVC_41 = 41, - MFX_LEVEL_HEVC_5 = 50, - MFX_LEVEL_HEVC_51 = 51, - MFX_LEVEL_HEVC_52 = 52, - MFX_LEVEL_HEVC_6 = 60, - MFX_LEVEL_HEVC_61 = 61, - MFX_LEVEL_HEVC_62 = 62, - - MFX_TIER_HEVC_MAIN = 0, - MFX_TIER_HEVC_HIGH = 0x100, - - /* VP9 Profiles */ - MFX_PROFILE_VP9_0 = 1, - MFX_PROFILE_VP9_1 = 2, - MFX_PROFILE_VP9_2 = 3, - MFX_PROFILE_VP9_3 = 4, - -#if (MFX_VERSION >= 1034) - /* AV1 Profiles */ - MFX_PROFILE_AV1_MAIN = 1, - MFX_PROFILE_AV1_HIGH = 2, - MFX_PROFILE_AV1_PRO = 3, - - MFX_LEVEL_AV1_2 = 20, - MFX_LEVEL_AV1_21 = 21, - MFX_LEVEL_AV1_22 = 22, - MFX_LEVEL_AV1_23 = 23, - MFX_LEVEL_AV1_3 = 30, - MFX_LEVEL_AV1_31 = 31, - MFX_LEVEL_AV1_32 = 32, - MFX_LEVEL_AV1_33 = 33, - MFX_LEVEL_AV1_4 = 40, - MFX_LEVEL_AV1_41 = 41, - MFX_LEVEL_AV1_42 = 42, - MFX_LEVEL_AV1_43 = 43, - MFX_LEVEL_AV1_5 = 50, - MFX_LEVEL_AV1_51 = 51, - MFX_LEVEL_AV1_52 = 52, - MFX_LEVEL_AV1_53 = 53, - MFX_LEVEL_AV1_6 = 60, - MFX_LEVEL_AV1_61 = 61, - MFX_LEVEL_AV1_62 = 62, - MFX_LEVEL_AV1_63 = 63, -#endif -}; - -/* GopOptFlag */ -enum { - MFX_GOP_CLOSED =1, - MFX_GOP_STRICT =2 -}; - -/* TargetUsages: from 1 to 7 inclusive */ -enum { - MFX_TARGETUSAGE_1 =1, - MFX_TARGETUSAGE_2 =2, - MFX_TARGETUSAGE_3 =3, - MFX_TARGETUSAGE_4 =4, - MFX_TARGETUSAGE_5 =5, - MFX_TARGETUSAGE_6 =6, - MFX_TARGETUSAGE_7 =7, - - MFX_TARGETUSAGE_UNKNOWN =0, - MFX_TARGETUSAGE_BEST_QUALITY =MFX_TARGETUSAGE_1, - MFX_TARGETUSAGE_BALANCED =MFX_TARGETUSAGE_4, - MFX_TARGETUSAGE_BEST_SPEED =MFX_TARGETUSAGE_7 -}; - -/* RateControlMethod */ -enum { - MFX_RATECONTROL_CBR =1, - MFX_RATECONTROL_VBR =2, - MFX_RATECONTROL_CQP =3, - MFX_RATECONTROL_AVBR =4, - MFX_RATECONTROL_RESERVED1 =5, - MFX_RATECONTROL_RESERVED2 =6, - MFX_RATECONTROL_RESERVED3 =100, - MFX_RATECONTROL_RESERVED4 =7, - MFX_RATECONTROL_LA =8, - MFX_RATECONTROL_ICQ =9, - MFX_RATECONTROL_VCM =10, - MFX_RATECONTROL_LA_ICQ =11, - MFX_RATECONTROL_LA_EXT =12, - MFX_RATECONTROL_LA_HRD =13, - MFX_RATECONTROL_QVBR =14, -}; - -/* Trellis control*/ -enum { - MFX_TRELLIS_UNKNOWN =0, - MFX_TRELLIS_OFF =0x01, - MFX_TRELLIS_I =0x02, - MFX_TRELLIS_P =0x04, - MFX_TRELLIS_B =0x08 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 reserved1; - mfxU16 RateDistortionOpt; /* tri-state option */ - mfxU16 MECostType; - mfxU16 MESearchType; - mfxI16Pair MVSearchWindow; - mfxU16 EndOfSequence; /* tri-state option */ - mfxU16 FramePicture; /* tri-state option */ - - mfxU16 CAVLC; /* tri-state option */ - mfxU16 reserved2[2]; - mfxU16 RecoveryPointSEI; /* tri-state option */ - mfxU16 ViewOutput; /* tri-state option */ - mfxU16 NalHrdConformance; /* tri-state option */ - mfxU16 SingleSeiNalUnit; /* tri-state option */ - mfxU16 VuiVclHrdParameters; /* tri-state option */ - - mfxU16 RefPicListReordering; /* tri-state option */ - mfxU16 ResetRefList; /* tri-state option */ - mfxU16 RefPicMarkRep; /* tri-state option */ - mfxU16 FieldOutput; /* tri-state option */ - - mfxU16 IntraPredBlockSize; - mfxU16 InterPredBlockSize; - mfxU16 MVPrecision; - mfxU16 MaxDecFrameBuffering; - - mfxU16 AUDelimiter; /* tri-state option */ - mfxU16 EndOfStream; /* tri-state option */ - mfxU16 PicTimingSEI; /* tri-state option */ - mfxU16 VuiNalHrdParameters; /* tri-state option */ -} mfxExtCodingOption; -MFX_PACK_END() - -enum { - MFX_B_REF_UNKNOWN = 0, - MFX_B_REF_OFF = 1, - MFX_B_REF_PYRAMID = 2 -}; - -enum { - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_LOOKAHEAD_DS_UNKNOWN) = 0, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_LOOKAHEAD_DS_OFF) = 1, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_LOOKAHEAD_DS_2x) = 2, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_LOOKAHEAD_DS_4x) = 3 -}; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_LOOKAHEAD_DS_UNKNOWN); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_LOOKAHEAD_DS_OFF); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_LOOKAHEAD_DS_2x); -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_LOOKAHEAD_DS_4x); - -enum { - MFX_BPSEI_DEFAULT = 0x00, - MFX_BPSEI_IFRAME = 0x01 -}; - -enum { - MFX_SKIPFRAME_NO_SKIP = 0, - MFX_SKIPFRAME_INSERT_DUMMY = 1, - MFX_SKIPFRAME_INSERT_NOTHING = 2, - MFX_SKIPFRAME_BRC_ONLY = 3, -}; - -/* Intra refresh types */ -enum { - MFX_REFRESH_NO = 0, - MFX_REFRESH_VERTICAL = 1, - MFX_REFRESH_HORIZONTAL = 2, - MFX_REFRESH_SLICE = 3 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 IntRefType; - mfxU16 IntRefCycleSize; - mfxI16 IntRefQPDelta; - - mfxU32 MaxFrameSize; - mfxU32 MaxSliceSize; - - mfxU16 BitrateLimit; /* tri-state option */ - mfxU16 MBBRC; /* tri-state option */ - mfxU16 ExtBRC; /* tri-state option */ - mfxU16 LookAheadDepth; - mfxU16 Trellis; - mfxU16 RepeatPPS; /* tri-state option */ - mfxU16 BRefType; - mfxU16 AdaptiveI; /* tri-state option */ - mfxU16 AdaptiveB; /* tri-state option */ - mfxU16 LookAheadDS; - mfxU16 NumMbPerSlice; - mfxU16 SkipFrame; - mfxU8 MinQPI; /* 1..51, 0 = default */ - mfxU8 MaxQPI; /* 1..51, 0 = default */ - mfxU8 MinQPP; /* 1..51, 0 = default */ - mfxU8 MaxQPP; /* 1..51, 0 = default */ - mfxU8 MinQPB; /* 1..51, 0 = default */ - mfxU8 MaxQPB; /* 1..51, 0 = default */ - mfxU16 FixedFrameRate; /* tri-state option */ - mfxU16 DisableDeblockingIdc; - mfxU16 DisableVUI; - mfxU16 BufferingPeriodSEI; - mfxU16 EnableMAD; /* tri-state option */ - mfxU16 UseRawRef; /* tri-state option */ -} mfxExtCodingOption2; -MFX_PACK_END() - -/* WeightedPred */ -enum { - MFX_WEIGHTED_PRED_UNKNOWN = 0, - MFX_WEIGHTED_PRED_DEFAULT = 1, - MFX_WEIGHTED_PRED_EXPLICIT = 2, - MFX_WEIGHTED_PRED_IMPLICIT = 3 -}; - -/* ScenarioInfo */ -enum { - MFX_SCENARIO_UNKNOWN = 0, - MFX_SCENARIO_DISPLAY_REMOTING = 1, - MFX_SCENARIO_VIDEO_CONFERENCE = 2, - MFX_SCENARIO_ARCHIVE = 3, - MFX_SCENARIO_LIVE_STREAMING = 4, - MFX_SCENARIO_CAMERA_CAPTURE = 5, - MFX_SCENARIO_VIDEO_SURVEILLANCE = 6, - MFX_SCENARIO_GAME_STREAMING = 7, - MFX_SCENARIO_REMOTE_GAMING = 8 -}; - -/* ContentInfo */ -enum { - MFX_CONTENT_UNKNOWN = 0, - MFX_CONTENT_FULL_SCREEN_VIDEO = 1, - MFX_CONTENT_NON_VIDEO_SCREEN = 2 -}; - -/* PRefType */ -enum { - MFX_P_REF_DEFAULT = 0, - MFX_P_REF_SIMPLE = 1, - MFX_P_REF_PYRAMID = 2 -}; - -#if (MFX_VERSION >= MFX_VERSION_NEXT) - -/* QuantScaleType */ -enum { - MFX_MPEG2_QUANT_SCALE_TYPE_DEFAULT = 0, - MFX_MPEG2_QUANT_SCALE_TYPE_LINEAR = 1, /* q_scale_type = 0 */ - MFX_MPEG2_QUANT_SCALE_TYPE_NONLINEAR = 2 /* q_scale_type = 1 */ -}; - -/* IntraVLCFormat */ -enum { - MFX_MPEG2_INTRA_VLC_FORMAT_DEFAULT = 0, - MFX_MPEG2_INTRA_VLC_FORMAT_B14 = 1, /* use table B.14 */ - MFX_MPEG2_INTRA_VLC_FORMAT_B15 = 2 /* use table B.15 */ -}; - -/* ScanType */ -enum { - MFX_MPEG2_SCAN_TYPE_DEFAULT = 0, - MFX_MPEG2_SCAN_TYPE_ZIGZAG = 1, /* alternate_scan = 0 */ - MFX_MPEG2_SCAN_TYPE_ALTERNATE = 2 /* alternate_scan = 1 */ -}; - -#endif - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 NumSliceI; - mfxU16 NumSliceP; - mfxU16 NumSliceB; - - mfxU16 WinBRCMaxAvgKbps; - mfxU16 WinBRCSize; - - mfxU16 QVBRQuality; - mfxU16 EnableMBQP; - mfxU16 IntRefCycleDist; - mfxU16 DirectBiasAdjustment; /* tri-state option */ - mfxU16 GlobalMotionBiasAdjustment; /* tri-state option */ - mfxU16 MVCostScalingFactor; - mfxU16 MBDisableSkipMap; /* tri-state option */ - - mfxU16 WeightedPred; - mfxU16 WeightedBiPred; - - mfxU16 AspectRatioInfoPresent; /* tri-state option */ - mfxU16 OverscanInfoPresent; /* tri-state option */ - mfxU16 OverscanAppropriate; /* tri-state option */ - mfxU16 TimingInfoPresent; /* tri-state option */ - mfxU16 BitstreamRestriction; /* tri-state option */ - mfxU16 LowDelayHrd; /* tri-state option */ - mfxU16 MotionVectorsOverPicBoundaries; /* tri-state option */ -#if (MFX_VERSION >= MFX_VERSION_NEXT) - mfxU16 Log2MaxMvLengthHorizontal; /* 0..16 */ - mfxU16 Log2MaxMvLengthVertical; /* 0..16 */ -#else - mfxU16 reserved1[2]; -#endif - - mfxU16 ScenarioInfo; - mfxU16 ContentInfo; - - mfxU16 PRefType; - mfxU16 FadeDetection; /* tri-state option */ -#if (MFX_VERSION >= MFX_VERSION_NEXT) - mfxI16 DeblockingAlphaTcOffset; /* -12..12 (slice_alpha_c0_offset_div2 << 1) */ - mfxI16 DeblockingBetaOffset; /* -12..12 (slice_beta_offset_div2 << 1) */ -#else - mfxU16 reserved2[2]; -#endif - mfxU16 GPB; /* tri-state option */ - - mfxU32 MaxFrameSizeI; - mfxU32 MaxFrameSizeP; - mfxU32 reserved3[3]; - - mfxU16 EnableQPOffset; /* tri-state option */ - mfxI16 QPOffset[8]; /* FrameQP = QPX + QPOffset[pyramid_layer]; QPX = QPB for B-pyramid, QPP for P-pyramid */ - - mfxU16 NumRefActiveP[8]; - mfxU16 NumRefActiveBL0[8]; - mfxU16 NumRefActiveBL1[8]; - -#if (MFX_VERSION >= MFX_VERSION_NEXT) - mfxU16 ConstrainedIntraPredFlag; /* tri-state option */ -#else - mfxU16 reserved6; -#endif -#if (MFX_VERSION >= 1026) - mfxU16 TransformSkip; /* tri-state option; HEVC transform_skip_enabled_flag */ -#else - mfxU16 reserved7; -#endif -#if (MFX_VERSION >= 1027) - mfxU16 TargetChromaFormatPlus1; /* Minus 1 specifies target encoding chroma format (see ColorFormat enum). May differ from input one. */ - mfxU16 TargetBitDepthLuma; /* Target encoding bit depth for luma samples. May differ from input one. */ - mfxU16 TargetBitDepthChroma; /* Target encoding bit depth for chroma samples. May differ from input one. */ -#else - mfxU16 reserved4[3]; -#endif - mfxU16 BRCPanicMode; /* tri-state option */ - - mfxU16 LowDelayBRC; /* tri-state option */ - mfxU16 EnableMBForceIntra; /* tri-state option */ - mfxU16 AdaptiveMaxFrameSize; /* tri-state option */ - - mfxU16 RepartitionCheckEnable; /* tri-state option */ -#if (MFX_VERSION >= MFX_VERSION_NEXT) - mfxU16 QuantScaleType; /* For MPEG2 specifies mapping between quantiser_scale_code and quantiser_scale (see QuantScaleType enum) */ - mfxU16 IntraVLCFormat; /* For MPEG2 specifies which table shall be used for coding of DCT coefficients of intra macroblocks (see IntraVLCFormat enum) */ - mfxU16 ScanType; /* For MPEG2 specifies transform coefficients scan pattern (see ScanType enum) */ -#else - mfxU16 reserved5[3]; -#endif -#if (MFX_VERSION >= 1025) - mfxU16 EncodedUnitsInfo; /* tri-state option */ - mfxU16 EnableNalUnitType; /* tri-state option */ -#else - mfxU16 reserved8[2]; -#endif -#if (MFX_VERSION >= 1026) - mfxU16 ExtBrcAdaptiveLTR; /* tri-state option for ExtBRC */ -#else - mfxU16 reserved9; -#endif - mfxU16 reserved[163]; -} mfxExtCodingOption3; -MFX_PACK_END() - -/* IntraPredBlockSize/InterPredBlockSize */ -enum { - MFX_BLOCKSIZE_UNKNOWN = 0, - MFX_BLOCKSIZE_MIN_16X16 = 1, /* 16x16 */ - MFX_BLOCKSIZE_MIN_8X8 = 2, /* 16x16, 8x8 */ - MFX_BLOCKSIZE_MIN_4X4 = 3 /* 16x16, 8x8, 4x4 */ -}; - -/* MVPrecision */ -enum { - MFX_MVPRECISION_UNKNOWN = 0, - MFX_MVPRECISION_INTEGER = (1 << 0), - MFX_MVPRECISION_HALFPEL = (1 << 1), - MFX_MVPRECISION_QUARTERPEL = (1 << 2) -}; - -enum { - MFX_CODINGOPTION_UNKNOWN =0, - MFX_CODINGOPTION_ON =0x10, - MFX_CODINGOPTION_OFF =0x20, - MFX_CODINGOPTION_ADAPTIVE =0x30 -}; - -/* Data Flag for mfxBitstream*/ -enum { - MFX_BITSTREAM_COMPLETE_FRAME = 0x0001, /* the bitstream contains a complete frame or field pair of data */ - MFX_BITSTREAM_EOS = 0x0002 -}; -/* Extended Buffer Ids */ -enum { - MFX_EXTBUFF_CODING_OPTION = MFX_MAKEFOURCC('C','D','O','P'), - MFX_EXTBUFF_CODING_OPTION_SPSPPS = MFX_MAKEFOURCC('C','O','S','P'), - MFX_EXTBUFF_VPP_DONOTUSE = MFX_MAKEFOURCC('N','U','S','E'), - MFX_EXTBUFF_VPP_AUXDATA = MFX_MAKEFOURCC('A','U','X','D'), - MFX_EXTBUFF_VPP_DENOISE = MFX_MAKEFOURCC('D','N','I','S'), - MFX_EXTBUFF_VPP_SCENE_ANALYSIS = MFX_MAKEFOURCC('S','C','L','Y'), - MFX_EXTBUFF_VPP_SCENE_CHANGE = MFX_EXTBUFF_VPP_SCENE_ANALYSIS, - MFX_EXTBUFF_VPP_PROCAMP = MFX_MAKEFOURCC('P','A','M','P'), - MFX_EXTBUFF_VPP_DETAIL = MFX_MAKEFOURCC('D','E','T',' '), - MFX_EXTBUFF_VIDEO_SIGNAL_INFO = MFX_MAKEFOURCC('V','S','I','N'), - MFX_EXTBUFF_VPP_DOUSE = MFX_MAKEFOURCC('D','U','S','E'), - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION) = MFX_MAKEFOURCC('O','P','Q','S'), - MFX_EXTBUFF_AVC_REFLIST_CTRL = MFX_MAKEFOURCC('R','L','S','T'), - MFX_EXTBUFF_VPP_FRAME_RATE_CONVERSION = MFX_MAKEFOURCC('F','R','C',' '), - MFX_EXTBUFF_PICTURE_TIMING_SEI = MFX_MAKEFOURCC('P','T','S','E'), - MFX_EXTBUFF_AVC_TEMPORAL_LAYERS = MFX_MAKEFOURCC('A','T','M','L'), - MFX_EXTBUFF_CODING_OPTION2 = MFX_MAKEFOURCC('C','D','O','2'), - MFX_EXTBUFF_VPP_IMAGE_STABILIZATION = MFX_MAKEFOURCC('I','S','T','B'), - MFX_EXTBUFF_VPP_PICSTRUCT_DETECTION = MFX_MAKEFOURCC('I','D','E','T'), - MFX_EXTBUFF_ENCODER_CAPABILITY = MFX_MAKEFOURCC('E','N','C','P'), - MFX_EXTBUFF_ENCODER_RESET_OPTION = MFX_MAKEFOURCC('E','N','R','O'), - MFX_EXTBUFF_ENCODED_FRAME_INFO = MFX_MAKEFOURCC('E','N','F','I'), - MFX_EXTBUFF_VPP_COMPOSITE = MFX_MAKEFOURCC('V','C','M','P'), - MFX_EXTBUFF_VPP_VIDEO_SIGNAL_INFO = MFX_MAKEFOURCC('V','V','S','I'), - MFX_EXTBUFF_ENCODER_ROI = MFX_MAKEFOURCC('E','R','O','I'), - MFX_EXTBUFF_VPP_DEINTERLACING = MFX_MAKEFOURCC('V','P','D','I'), - MFX_EXTBUFF_AVC_REFLISTS = MFX_MAKEFOURCC('R','L','T','S'), - MFX_EXTBUFF_DEC_VIDEO_PROCESSING = MFX_MAKEFOURCC('D','E','C','V'), - MFX_EXTBUFF_VPP_FIELD_PROCESSING = MFX_MAKEFOURCC('F','P','R','O'), - MFX_EXTBUFF_CODING_OPTION3 = MFX_MAKEFOURCC('C','D','O','3'), - MFX_EXTBUFF_CHROMA_LOC_INFO = MFX_MAKEFOURCC('C','L','I','N'), - MFX_EXTBUFF_MBQP = MFX_MAKEFOURCC('M','B','Q','P'), - MFX_EXTBUFF_MB_FORCE_INTRA = MFX_MAKEFOURCC('M','B','F','I'), - MFX_EXTBUFF_HEVC_TILES = MFX_MAKEFOURCC('2','6','5','T'), - MFX_EXTBUFF_MB_DISABLE_SKIP_MAP = MFX_MAKEFOURCC('M','D','S','M'), - MFX_EXTBUFF_HEVC_PARAM = MFX_MAKEFOURCC('2','6','5','P'), - MFX_EXTBUFF_DECODED_FRAME_INFO = MFX_MAKEFOURCC('D','E','F','I'), - MFX_EXTBUFF_TIME_CODE = MFX_MAKEFOURCC('T','M','C','D'), - MFX_EXTBUFF_HEVC_REGION = MFX_MAKEFOURCC('2','6','5','R'), - MFX_EXTBUFF_PRED_WEIGHT_TABLE = MFX_MAKEFOURCC('E','P','W','T'), - MFX_EXTBUFF_DIRTY_RECTANGLES = MFX_MAKEFOURCC('D','R','O','I'), - MFX_EXTBUFF_MOVING_RECTANGLES = MFX_MAKEFOURCC('M','R','O','I'), - MFX_EXTBUFF_CODING_OPTION_VPS = MFX_MAKEFOURCC('C','O','V','P'), - MFX_EXTBUFF_VPP_ROTATION = MFX_MAKEFOURCC('R','O','T',' '), - MFX_EXTBUFF_ENCODED_SLICES_INFO = MFX_MAKEFOURCC('E','N','S','I'), - MFX_EXTBUFF_VPP_SCALING = MFX_MAKEFOURCC('V','S','C','L'), - MFX_EXTBUFF_HEVC_REFLIST_CTRL = MFX_EXTBUFF_AVC_REFLIST_CTRL, - MFX_EXTBUFF_HEVC_REFLISTS = MFX_EXTBUFF_AVC_REFLISTS, - MFX_EXTBUFF_HEVC_TEMPORAL_LAYERS = MFX_EXTBUFF_AVC_TEMPORAL_LAYERS, - MFX_EXTBUFF_VPP_MIRRORING = MFX_MAKEFOURCC('M','I','R','R'), - MFX_EXTBUFF_MV_OVER_PIC_BOUNDARIES = MFX_MAKEFOURCC('M','V','P','B'), - MFX_EXTBUFF_VPP_COLORFILL = MFX_MAKEFOURCC('V','C','L','F'), -#if (MFX_VERSION >= 1025) - MFX_EXTBUFF_DECODE_ERROR_REPORT = MFX_MAKEFOURCC('D', 'E', 'R', 'R'), - MFX_EXTBUFF_VPP_COLOR_CONVERSION = MFX_MAKEFOURCC('V', 'C', 'S', 'C'), - MFX_EXTBUFF_CONTENT_LIGHT_LEVEL_INFO = MFX_MAKEFOURCC('L', 'L', 'I', 'S'), - MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME = MFX_MAKEFOURCC('D', 'C', 'V', 'S'), - MFX_EXTBUFF_MULTI_FRAME_PARAM = MFX_MAKEFOURCC('M', 'F', 'R', 'P'), - MFX_EXTBUFF_MULTI_FRAME_CONTROL = MFX_MAKEFOURCC('M', 'F', 'R', 'C'), - MFX_EXTBUFF_ENCODED_UNITS_INFO = MFX_MAKEFOURCC('E', 'N', 'U', 'I'), -#endif -#if (MFX_VERSION >= 1026) - MFX_EXTBUFF_VPP_MCTF = MFX_MAKEFOURCC('M', 'C', 'T', 'F'), - MFX_EXTBUFF_VP9_SEGMENTATION = MFX_MAKEFOURCC('9', 'S', 'E', 'G'), - MFX_EXTBUFF_VP9_TEMPORAL_LAYERS = MFX_MAKEFOURCC('9', 'T', 'M', 'L'), - MFX_EXTBUFF_VP9_PARAM = MFX_MAKEFOURCC('9', 'P', 'A', 'R'), -#endif -#if (MFX_VERSION >= 1027) - MFX_EXTBUFF_AVC_ROUNDING_OFFSET = MFX_MAKEFOURCC('R','N','D','O'), -#endif -#if (MFX_VERSION >= MFX_VERSION_NEXT) - MFX_EXTBUFF_DPB = MFX_MAKEFOURCC('E','D','P','B'), - MFX_EXTBUFF_TEMPORAL_LAYERS = MFX_MAKEFOURCC('T','M','P','L'), - MFX_EXTBUFF_AVC_SCALING_MATRIX = MFX_MAKEFOURCC('A','V','S','M'), - MFX_EXTBUFF_MPEG2_QUANT_MATRIX = MFX_MAKEFOURCC('M','2','Q','M'), - MFX_EXTBUFF_TASK_DEPENDENCY = MFX_MAKEFOURCC('S','Y','N','C'), -#endif -#if (MFX_VERSION >= 1031) - MFX_EXTBUFF_PARTIAL_BITSTREAM_PARAM = MFX_MAKEFOURCC('P','B','O','P'), -#endif - MFX_EXTBUFF_ENCODER_IPCM_AREA = MFX_MAKEFOURCC('P', 'C', 'M', 'R'), - MFX_EXTBUFF_INSERT_HEADERS = MFX_MAKEFOURCC('S', 'P', 'R', 'E'), -#if (MFX_VERSION >= 1034) - MFX_EXTBUFF_AV1_FILM_GRAIN_PARAM = MFX_MAKEFOURCC('A','1','F','G'), - MFX_EXTBUFF_AV1_LST_PARAM = MFX_MAKEFOURCC('A', '1', 'L', 'S'), - MFX_EXTBUFF_AV1_SEGMENTATION = MFX_MAKEFOURCC('1', 'S', 'E', 'G'), - MFX_EXTBUFF_AV1_PARAM = MFX_MAKEFOURCC('1', 'P', 'A', 'R'), - MFX_EXTBUFF_AV1_AUXDATA = MFX_MAKEFOURCC('1', 'A', 'U', 'X'), - MFX_EXTBUFF_AV1_TEMPORAL_LAYERS = MFX_MAKEFOURCC('1', 'T', 'M', 'L') -#endif -}; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION); - -/* VPP Conf: Do not use certain algorithms */ -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; - mfxU32 NumAlg; - mfxU32* AlgList; -} mfxExtVPPDoNotUse; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 DenoiseFactor; -} mfxExtVPPDenoise; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 DetailFactor; -} mfxExtVPPDetail; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - mfxF64 Brightness; - mfxF64 Contrast; - mfxF64 Hue; - mfxF64 Saturation; -} mfxExtVPPProcAmp; -MFX_PACK_END() - -/* statistics collected for decode, encode and vpp */ -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxU32 reserved[16]; - mfxU32 NumFrame; - mfxU64 NumBit; - mfxU32 NumCachedFrame; -} mfxEncodeStat; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU32 reserved[16]; - mfxU32 NumFrame; - mfxU32 NumSkippedFrame; - mfxU32 NumError; - mfxU32 NumCachedFrame; -} mfxDecodeStat; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU32 reserved[16]; - mfxU32 NumFrame; - mfxU32 NumCachedFrame; -} mfxVPPStat; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - union{ - struct{ - mfxU32 SpatialComplexity; - mfxU32 TemporalComplexity; - }; - struct{ - mfxU16 PicStruct; - mfxU16 reserved[3]; - }; - }; - mfxU16 SceneChangeRate; - mfxU16 RepeatedFrame; -} mfxExtVppAuxData; -MFX_PACK_END() - -/* CtrlFlags */ -enum { - MFX_PAYLOAD_CTRL_SUFFIX = 0x00000001 /* HEVC suffix SEI */ -}; - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxU32 CtrlFlags; - mfxU32 reserved[3]; - mfxU8 *Data; /* buffer pointer */ - mfxU32 NumBit; /* number of bits */ - mfxU16 Type; /* SEI message type in H.264 or user data start_code in MPEG-2 */ - mfxU16 BufSize; /* payload buffer size in bytes */ -} mfxPayload; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; -#if (MFX_VERSION >= 1025) - mfxU32 reserved[4]; - mfxU16 reserved1; - mfxU16 MfxNalUnitType; -#else - mfxU32 reserved[5]; -#endif - mfxU16 SkipFrame; - - mfxU16 QP; /* per frame QP */ - - mfxU16 FrameType; - mfxU16 NumExtParam; - mfxU16 NumPayload; /* MPEG-2 user data or H.264 SEI message(s) */ - mfxU16 reserved2; - - mfxExtBuffer **ExtParam; - mfxPayload **Payload; /* for field pair, first field uses even payloads and second field uses odd payloads */ -} mfxEncodeCtrl; -MFX_PACK_END() - -/* Buffer Memory Types */ -enum { - /* Buffer types */ - MFX_MEMTYPE_PERSISTENT_MEMORY =0x0002 -}; - -/* Frame Memory Types */ -#define MFX_MEMTYPE_BASE(x) (0x90ff & (x)) - -enum { - MFX_MEMTYPE_DXVA2_DECODER_TARGET =0x0010, - MFX_MEMTYPE_DXVA2_PROCESSOR_TARGET =0x0020, - MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET = MFX_MEMTYPE_DXVA2_DECODER_TARGET, - MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET = MFX_MEMTYPE_DXVA2_PROCESSOR_TARGET, - MFX_MEMTYPE_SYSTEM_MEMORY =0x0040, - MFX_MEMTYPE_RESERVED1 =0x0080, - - MFX_MEMTYPE_FROM_ENCODE = 0x0100, - MFX_MEMTYPE_FROM_DECODE = 0x0200, - MFX_MEMTYPE_FROM_VPPIN = 0x0400, - MFX_MEMTYPE_FROM_VPPOUT = 0x0800, - MFX_MEMTYPE_FROM_ENC = 0x2000, - MFX_MEMTYPE_FROM_PAK = 0x4000, //reserved - - MFX_MEMTYPE_INTERNAL_FRAME = 0x0001, - MFX_MEMTYPE_EXTERNAL_FRAME = 0x0002, - MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_MEMTYPE_OPAQUE_FRAME) = 0x0004, - MFX_MEMTYPE_EXPORT_FRAME = 0x0008, - MFX_MEMTYPE_SHARED_RESOURCE = MFX_MEMTYPE_EXPORT_FRAME, -#if (MFX_VERSION >= 1025) - MFX_MEMTYPE_VIDEO_MEMORY_ENCODER_TARGET = 0x1000 -#else - MFX_MEMTYPE_RESERVED2 = 0x1000 -#endif -}; - -MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_MEMTYPE_OPAQUE_FRAME); - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - union { - mfxU32 AllocId; - mfxU32 reserved[1]; - }; - mfxU32 reserved3[3]; - mfxFrameInfo Info; - mfxU16 Type; /* decoder or processor render targets */ - mfxU16 NumFrameMin; - mfxU16 NumFrameSuggested; - mfxU16 reserved2; -} mfxFrameAllocRequest; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxU32 AllocId; - mfxU32 reserved[3]; - mfxMemId *mids; /* the array allocated by application */ - mfxU16 NumFrameActual; -#if (MFX_VERSION >= MFX_VERSION_NEXT) - mfxU16 MemType; -#else - mfxU16 reserved2; -#endif -} mfxFrameAllocResponse; -MFX_PACK_END() - -/* FrameType */ -enum { - MFX_FRAMETYPE_UNKNOWN =0x0000, - - MFX_FRAMETYPE_I =0x0001, - MFX_FRAMETYPE_P =0x0002, - MFX_FRAMETYPE_B =0x0004, - MFX_FRAMETYPE_S =0x0008, - - MFX_FRAMETYPE_REF =0x0040, - MFX_FRAMETYPE_IDR =0x0080, - - MFX_FRAMETYPE_xI =0x0100, - MFX_FRAMETYPE_xP =0x0200, - MFX_FRAMETYPE_xB =0x0400, - MFX_FRAMETYPE_xS =0x0800, - - MFX_FRAMETYPE_xREF =0x4000, - MFX_FRAMETYPE_xIDR =0x8000 -}; - -#if (MFX_VERSION >= 1025) -enum { - MFX_HEVC_NALU_TYPE_UNKNOWN = 0, - MFX_HEVC_NALU_TYPE_TRAIL_N = ( 0+1), - MFX_HEVC_NALU_TYPE_TRAIL_R = ( 1+1), - MFX_HEVC_NALU_TYPE_RADL_N = ( 6+1), - MFX_HEVC_NALU_TYPE_RADL_R = ( 7+1), - MFX_HEVC_NALU_TYPE_RASL_N = ( 8+1), - MFX_HEVC_NALU_TYPE_RASL_R = ( 9+1), - MFX_HEVC_NALU_TYPE_IDR_W_RADL = (19+1), - MFX_HEVC_NALU_TYPE_IDR_N_LP = (20+1), - MFX_HEVC_NALU_TYPE_CRA_NUT = (21+1) -}; -#endif - -typedef enum { - MFX_HANDLE_DIRECT3D_DEVICE_MANAGER9 =1, /* IDirect3DDeviceManager9 */ - MFX_HANDLE_D3D9_DEVICE_MANAGER = MFX_HANDLE_DIRECT3D_DEVICE_MANAGER9, - MFX_HANDLE_RESERVED1 = 2, - MFX_HANDLE_D3D11_DEVICE = 3, - MFX_HANDLE_VA_DISPLAY = 4, - MFX_HANDLE_RESERVED3 = 5, -#if (MFX_VERSION >= 1030) - MFX_HANDLE_VA_CONFIG_ID = 6, - MFX_HANDLE_VA_CONTEXT_ID = 7, -#endif -#if (MFX_VERSION >= MFX_VERSION_NEXT) - MFX_HANDLE_CM_DEVICE = 8 -#endif -} mfxHandleType; - -typedef enum { - MFX_SKIPMODE_NOSKIP=0, - MFX_SKIPMODE_MORE=1, - MFX_SKIPMODE_LESS=2 -} mfxSkipMode; - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; - mfxU8 *SPSBuffer; - mfxU8 *PPSBuffer; - mfxU16 SPSBufSize; - mfxU16 PPSBufSize; - mfxU16 SPSId; - mfxU16 PPSId; -} mfxExtCodingOptionSPSPPS; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - - union { - mfxU8 *VPSBuffer; - mfxU64 reserved1; - }; - mfxU16 VPSBufSize; - mfxU16 VPSId; - - mfxU16 reserved[6]; -} mfxExtCodingOptionVPS; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 VideoFormat; - mfxU16 VideoFullRange; - mfxU16 ColourDescriptionPresent; - mfxU16 ColourPrimaries; - mfxU16 TransferCharacteristics; - mfxU16 MatrixCoefficients; -} mfxExtVideoSignalInfo; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; - mfxU32 NumAlg; - mfxU32 *AlgList; -} mfxExtVPPDoUse; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[2]; - struct { - mfxFrameSurface1 **Surfaces; - mfxU32 reserved2[5]; - mfxU16 Type; - mfxU16 NumSurface; - } In, Out; -} mfxExtOpaqueSurfaceAlloc; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 NumRefIdxL0Active; - mfxU16 NumRefIdxL1Active; - - struct { - mfxU32 FrameOrder; - mfxU16 PicStruct; - mfxU16 ViewId; - mfxU16 LongTermIdx; - mfxU16 reserved[3]; - } PreferredRefList[32], RejectedRefList[16], LongTermRefList[16]; - - mfxU16 ApplyLongTermIdx; - mfxU16 reserved[15]; -} mfxExtAVCRefListCtrl; -MFX_PACK_END() - -enum { - MFX_FRCALGM_PRESERVE_TIMESTAMP = 0x0001, - MFX_FRCALGM_DISTRIBUTED_TIMESTAMP = 0x0002, - MFX_FRCALGM_FRAME_INTERPOLATION = 0x0004 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 Algorithm; - mfxU16 reserved; - mfxU32 reserved2[15]; -} mfxExtVPPFrameRateConversion; -MFX_PACK_END() - -enum { - MFX_IMAGESTAB_MODE_UPSCALE = 0x0001, - MFX_IMAGESTAB_MODE_BOXING = 0x0002 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 Mode; - mfxU16 reserved[11]; -} mfxExtVPPImageStab; -MFX_PACK_END() - -#if (MFX_VERSION >= 1025) - -enum { - MFX_PAYLOAD_OFF = 0, - MFX_PAYLOAD_IDR = 1 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 reserved[15]; - - mfxU16 InsertPayloadToggle; - mfxU16 DisplayPrimariesX[3]; - mfxU16 DisplayPrimariesY[3]; - mfxU16 WhitePointX; - mfxU16 WhitePointY; - mfxU32 MaxDisplayMasteringLuminance; - mfxU32 MinDisplayMasteringLuminance; -} mfxExtMasteringDisplayColourVolume; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 reserved[9]; - - mfxU16 InsertPayloadToggle; - mfxU16 MaxContentLightLevel; - mfxU16 MaxPicAverageLightLevel; -} mfxExtContentLightLevelInfo; -MFX_PACK_END() -#endif - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU32 reserved[14]; - - struct { - mfxU16 ClockTimestampFlag; - mfxU16 CtType; - mfxU16 NuitFieldBasedFlag; - mfxU16 CountingType; - mfxU16 FullTimestampFlag; - mfxU16 DiscontinuityFlag; - mfxU16 CntDroppedFlag; - mfxU16 NFrames; - mfxU16 SecondsFlag; - mfxU16 MinutesFlag; - mfxU16 HoursFlag; - mfxU16 SecondsValue; - mfxU16 MinutesValue; - mfxU16 HoursValue; - mfxU32 TimeOffset; - } TimeStamp[3]; -} mfxExtPictureTimingSEI; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU32 reserved1[4]; - mfxU16 reserved2; - mfxU16 BaseLayerPID; - - struct { - mfxU16 Scale; - mfxU16 reserved[3]; - }Layer[8]; -} mfxExtAvcTemporalLayers; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU32 MBPerSec; - mfxU16 reserved[58]; -} mfxExtEncoderCapability; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 StartNewSequence; - mfxU16 reserved[11]; -} mfxExtEncoderResetOption; -MFX_PACK_END() - -/*LongTermIdx*/ -enum { - MFX_LONGTERM_IDX_NO_IDX = 0xFFFF -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU32 FrameOrder; - mfxU16 PicStruct; - mfxU16 LongTermIdx; - mfxU32 MAD; - mfxU16 BRCPanicMode; - mfxU16 QP; - mfxU32 SecondFieldOffset; - mfxU16 reserved[2]; - - struct { - mfxU32 FrameOrder; - mfxU16 PicStruct; - mfxU16 LongTermIdx; - mfxU16 reserved[4]; - } UsedRefListL0[32], UsedRefListL1[32]; -} mfxExtAVCEncodedFrameInfo; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct mfxVPPCompInputStream { - mfxU32 DstX; - mfxU32 DstY; - mfxU32 DstW; - mfxU32 DstH; - - mfxU16 LumaKeyEnable; - mfxU16 LumaKeyMin; - mfxU16 LumaKeyMax; - - mfxU16 GlobalAlphaEnable; - mfxU16 GlobalAlpha; - mfxU16 PixelAlphaEnable; - - mfxU16 TileId; - - mfxU16 reserved2[17]; -} mfxVPPCompInputStream; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; - - /* background color*/ - union { - mfxU16 Y; - mfxU16 R; - }; - union { - mfxU16 U; - mfxU16 G; - }; - union { - mfxU16 V; - mfxU16 B; - }; - mfxU16 NumTiles; - mfxU16 reserved1[23]; - - mfxU16 NumInputStream; - mfxVPPCompInputStream *InputStream; -} mfxExtVPPComposite; -MFX_PACK_END() - -/* TransferMatrix */ -enum { - MFX_TRANSFERMATRIX_UNKNOWN = 0, - MFX_TRANSFERMATRIX_BT709 = 1, - MFX_TRANSFERMATRIX_BT601 = 2 -}; - -/* NominalRange */ -enum { - MFX_NOMINALRANGE_UNKNOWN = 0, - MFX_NOMINALRANGE_0_255 = 1, - MFX_NOMINALRANGE_16_235 = 2 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 reserved1[4]; - - union { - struct { // Init - struct { - mfxU16 TransferMatrix; - mfxU16 NominalRange; - mfxU16 reserved2[6]; - } In, Out; - }; - struct { // Runtime - mfxU16 TransferMatrix; - mfxU16 NominalRange; - mfxU16 reserved3[14]; - }; - }; -} mfxExtVPPVideoSignalInfo; -MFX_PACK_END() - -/* ROI encoding mode */ -enum { - MFX_ROI_MODE_PRIORITY = 0, - MFX_ROI_MODE_QP_DELTA = 1, - MFX_ROI_MODE_QP_VALUE = 2 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 NumROI; - mfxU16 ROIMode; - mfxU16 reserved1[10]; - - struct { - mfxU32 Left; - mfxU32 Top; - mfxU32 Right; - mfxU32 Bottom; - union { - mfxI16 Priority; - mfxI16 DeltaQP; - }; - mfxU16 reserved2[7]; - } ROI[256]; -} mfxExtEncoderROI; -MFX_PACK_END() - -/*Deinterlacing Mode*/ -enum { - MFX_DEINTERLACING_BOB = 1, - MFX_DEINTERLACING_ADVANCED = 2, - MFX_DEINTERLACING_AUTO_DOUBLE = 3, - MFX_DEINTERLACING_AUTO_SINGLE = 4, - MFX_DEINTERLACING_FULL_FR_OUT = 5, - MFX_DEINTERLACING_HALF_FR_OUT = 6, - MFX_DEINTERLACING_24FPS_OUT = 7, - MFX_DEINTERLACING_FIXED_TELECINE_PATTERN = 8, - MFX_DEINTERLACING_30FPS_OUT = 9, - MFX_DEINTERLACING_DETECT_INTERLACE = 10, - MFX_DEINTERLACING_ADVANCED_NOREF = 11, - MFX_DEINTERLACING_ADVANCED_SCD = 12, - MFX_DEINTERLACING_FIELD_WEAVING = 13 -}; - -/*TelecinePattern*/ -enum { - MFX_TELECINE_PATTERN_32 = 0, - MFX_TELECINE_PATTERN_2332 = 1, - MFX_TELECINE_PATTERN_FRAME_REPEAT = 2, - MFX_TELECINE_PATTERN_41 = 3, - MFX_TELECINE_POSITION_PROVIDED = 4 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 Mode; - mfxU16 TelecinePattern; - mfxU16 TelecineLocation; - mfxU16 reserved[9]; -} mfxExtVPPDeinterlacing; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 NumRefIdxL0Active; - mfxU16 NumRefIdxL1Active; - mfxU16 reserved[2]; - - struct mfxRefPic{ - mfxU32 FrameOrder; - mfxU16 PicStruct; - mfxU16 reserved[5]; - } RefPicList0[32], RefPicList1[32]; - -}mfxExtAVCRefLists; -MFX_PACK_END() - -enum { - MFX_VPP_COPY_FRAME =0x01, - MFX_VPP_COPY_FIELD =0x02, - MFX_VPP_SWAP_FIELDS =0x03 -}; - -/*PicType*/ -enum { - MFX_PICTYPE_UNKNOWN =0x00, - MFX_PICTYPE_FRAME =0x01, - MFX_PICTYPE_TOPFIELD =0x02, - MFX_PICTYPE_BOTTOMFIELD =0x04 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 Mode; - mfxU16 InField; - mfxU16 OutField; - mfxU16 reserved[25]; -} mfxExtVPPFieldProcessing; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - struct mfxIn{ - mfxU16 CropX; - mfxU16 CropY; - mfxU16 CropW; - mfxU16 CropH; - mfxU16 reserved[12]; - }In; - - struct mfxOut{ - mfxU32 FourCC; - mfxU16 ChromaFormat; - mfxU16 reserved1; - - mfxU16 Width; - mfxU16 Height; - - mfxU16 CropX; - mfxU16 CropY; - mfxU16 CropW; - mfxU16 CropH; - mfxU16 reserved[22]; - }Out; - - mfxU16 reserved[13]; -} mfxExtDecVideoProcessing; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 ChromaLocInfoPresentFlag; - mfxU16 ChromaSampleLocTypeTopField; - mfxU16 ChromaSampleLocTypeBottomField; - mfxU16 reserved[9]; -} mfxExtChromaLocInfo; -MFX_PACK_END() - -/* MBQPMode */ -enum { - MFX_MBQP_MODE_QP_VALUE = 0, // supported in CQP mode only - MFX_MBQP_MODE_QP_DELTA = 1, - MFX_MBQP_MODE_QP_ADAPTIVE = 2 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct{ - union { - mfxU8 QP; - mfxI8 DeltaQP; - }; - mfxU16 Mode; -} mfxQPandMode; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - - mfxU32 reserved[10]; - mfxU16 Mode; // see MBQPMode enum - mfxU16 BlockSize; // QP block size, valid for HEVC only during Init and Runtime - mfxU32 NumQPAlloc; // Size of allocated by application QP or DeltaQP array - union { - mfxU8 *QP; // Block QP value. Valid when Mode = MFX_MBQP_MODE_QP_VALUE - mfxI8 *DeltaQP; // For block i: QP[i] = BrcQP[i] + DeltaQP[i]. Valid when Mode = MFX_MBQP_MODE_QP_DELTA -#if (MFX_VERSION >= 1034) - mfxQPandMode *QPmode; // Block-granularity modes when MFX_MBQP_MODE_QP_ADAPTIVE is set -#endif - mfxU64 reserved2; - }; -} mfxExtMBQP; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; /* Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_INSERT_HEADERS. */ - mfxU16 SPS; /* tri-state option to insert SPS */ - mfxU16 PPS; /* tri-state option to insert PPS */ - mfxU16 reserved[8]; -} mfxExtInsertHeaders; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxExtBuffer Header; /* Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_ENCODER_IPCM_AREA. */ - mfxU16 reserve1[10]; - - mfxU16 NumArea; /* Number of Area's */ - struct area { - mfxU32 Left; /* Left Area's coordinate. */ - mfxU32 Top; /* Top Area's coordinate. */ - mfxU32 Right; /* Right Area's coordinate. */ - mfxU32 Bottom; /* Bottom Area's coordinate. */ - - mfxU16 reserved2[8]; - } * Areas; /* Array of areas. */ -} mfxExtEncoderIPCMArea; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - - mfxU32 reserved[11]; - mfxU32 MapSize; - union { - mfxU8 *Map; - mfxU64 reserved2; - }; -} mfxExtMBForceIntra; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 NumTileRows; - mfxU16 NumTileColumns; - mfxU16 reserved[74]; -}mfxExtHEVCTiles; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - - mfxU32 reserved[11]; - mfxU32 MapSize; - union { - mfxU8 *Map; - mfxU64 reserved2; - }; -} mfxExtMBDisableSkipMap; -MFX_PACK_END() - -#if (MFX_VERSION >= MFX_VERSION_NEXT) -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 DPBSize; - mfxU16 reserved[11]; - - struct { - mfxU32 FrameOrder; - mfxU16 PicType; - mfxU16 LongTermIdx; - mfxU16 reserved[4]; - } DPB[32]; -} mfxExtDPB; -MFX_PACK_END() - -#endif - -/*GeneralConstraintFlags*/ -enum { - /* REXT Profile constraint flags*/ - MFX_HEVC_CONSTR_REXT_MAX_12BIT = (1 << 0), - MFX_HEVC_CONSTR_REXT_MAX_10BIT = (1 << 1), - MFX_HEVC_CONSTR_REXT_MAX_8BIT = (1 << 2), - MFX_HEVC_CONSTR_REXT_MAX_422CHROMA = (1 << 3), - MFX_HEVC_CONSTR_REXT_MAX_420CHROMA = (1 << 4), - MFX_HEVC_CONSTR_REXT_MAX_MONOCHROME = (1 << 5), - MFX_HEVC_CONSTR_REXT_INTRA = (1 << 6), - MFX_HEVC_CONSTR_REXT_ONE_PICTURE_ONLY = (1 << 7), - MFX_HEVC_CONSTR_REXT_LOWER_BIT_RATE = (1 << 8) -}; - -#if (MFX_VERSION >= 1026) - -/* SampleAdaptiveOffset */ -enum { - MFX_SAO_UNKNOWN = 0x00, - MFX_SAO_DISABLE = 0x01, - MFX_SAO_ENABLE_LUMA = 0x02, - MFX_SAO_ENABLE_CHROMA = 0x04 -}; - -#endif - -/* This struct has 4-byte alignment for binary compatibility with previously released versions of API */ -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 PicWidthInLumaSamples; - mfxU16 PicHeightInLumaSamples; - mfxU64 GeneralConstraintFlags; -#if (MFX_VERSION >= 1026) - mfxU16 SampleAdaptiveOffset; /* see enum SampleAdaptiveOffset, valid during Init and Runtime */ - mfxU16 LCUSize; - mfxU16 reserved[116]; -#else - mfxU16 reserved[118]; -#endif -} mfxExtHEVCParam; -MFX_PACK_END() - -#if (MFX_VERSION >= 1025) -/*ErrorTypes in mfxExtDecodeErrorReport*/ -enum { - MFX_ERROR_PPS = (1 << 0), - MFX_ERROR_SPS = (1 << 1), - MFX_ERROR_SLICEHEADER = (1 << 2), - MFX_ERROR_SLICEDATA = (1 << 3), - MFX_ERROR_FRAME_GAP = (1 << 4), -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU32 ErrorTypes; - mfxU16 reserved[10]; -} mfxExtDecodeErrorReport; -MFX_PACK_END() - -#endif - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 FrameType; - mfxU16 reserved[59]; -} mfxExtDecodedFrameInfo; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 DropFrameFlag; - mfxU16 TimeCodeHours; - mfxU16 TimeCodeMinutes; - mfxU16 TimeCodeSeconds; - mfxU16 TimeCodePictures; - mfxU16 reserved[7]; -} mfxExtTimeCode; -MFX_PACK_END() - -/*RegionType*/ -enum { - MFX_HEVC_REGION_SLICE = 0 -}; - -/*RegionEncoding*/ -enum { - MFX_HEVC_REGION_ENCODING_ON = 0, - MFX_HEVC_REGION_ENCODING_OFF = 1 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU32 RegionId; - mfxU16 RegionType; - mfxU16 RegionEncoding; - mfxU16 reserved[24]; -} mfxExtHEVCRegion; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 LumaLog2WeightDenom; // 0..7 - mfxU16 ChromaLog2WeightDenom; // 0..7 - mfxU16 LumaWeightFlag[2][32]; // [list] 0,1 - mfxU16 ChromaWeightFlag[2][32]; // [list] 0,1 - mfxI16 Weights[2][32][3][2]; // [list][list entry][Y, Cb, Cr][weight, offset] - mfxU16 reserved[58]; -} mfxExtPredWeightTable; -MFX_PACK_END() - -#if (MFX_VERSION >= 1027) -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 EnableRoundingIntra; // tri-state option - mfxU16 RoundingOffsetIntra; // valid value [0,7] - mfxU16 EnableRoundingInter; // tri-state option - mfxU16 RoundingOffsetInter; // valid value [0,7] - - mfxU16 reserved[24]; -} mfxExtAVCRoundingOffset; -MFX_PACK_END() -#endif - -#if (MFX_VERSION >= MFX_VERSION_NEXT) -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 reserved[12]; - - struct { - mfxU16 Scale; - mfxU16 QPI; - mfxU16 QPP; - mfxU16 QPB; - mfxU32 TargetKbps; - mfxU32 MaxKbps; - mfxU32 BufferSizeInKB; - mfxU32 InitialDelayInKB; - mfxU16 reserved1[20]; - } Layer[8]; -} mfxExtTemporalLayers; -MFX_PACK_END() - -#endif - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 NumRect; - mfxU16 reserved1[11]; - - struct { - mfxU32 Left; - mfxU32 Top; - mfxU32 Right; - mfxU32 Bottom; - - mfxU16 reserved2[8]; - } Rect[256]; -} mfxExtDirtyRect; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 NumRect; - mfxU16 reserved1[11]; - - struct { - mfxU32 DestLeft; - mfxU32 DestTop; - mfxU32 DestRight; - mfxU32 DestBottom; - - mfxU32 SourceLeft; - mfxU32 SourceTop; - mfxU16 reserved2[4]; - } Rect[256]; -} mfxExtMoveRect; -MFX_PACK_END() - -#if (MFX_VERSION >= MFX_VERSION_NEXT) - -/* ScalingMatrixType */ -enum { - MFX_SCALING_MATRIX_SPS = 1, - MFX_SCALING_MATRIX_PPS = 2 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 Type; - mfxU16 reserved[5]; - - /* [4x4_Intra_Y, 4x4_Intra_Cb, 4x4_Intra_Cr, - 4x4_Inter_Y, 4x4_Inter_Cb, 4x4_Inter_Cr, - 8x8_Intra_Y, 8x8_Inter_Y, 8x8_Intra_Cb, - 8x8_Inter_Cb, 8x8_Intra_Cr, 8x8_Inter_Cr] */ - mfxU8 ScalingListPresent[12]; - - /* [Intra_Y, Intra_Cb, Intra_Cr, - Inter_Y, Inter_Cb, Inter_Cr] */ - mfxU8 ScalingList4x4[6][16]; - - /* [Intra_Y, Inter_Y, Intra_Cb, - Inter_Cb, Intra_Cr, Inter_Cr] */ - mfxU8 ScalingList8x8[6][64]; -} mfxExtAVCScalingMatrix; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 reserved[28]; - - mfxU8 LoadMatrix[4]; // [LumaIntra, LumaInter, ChromaIntra, ChromaInter] - mfxU8 Matrix[4][64]; // [LumaIntra, LumaInter, ChromaIntra, ChromaInter] -} mfxExtMPEG2QuantMatrix; -MFX_PACK_END() - -#endif - -/* Angle */ -enum { - MFX_ANGLE_0 = 0, - MFX_ANGLE_90 = 90, - MFX_ANGLE_180 = 180, - MFX_ANGLE_270 = 270 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 Angle; - mfxU16 reserved[11]; -} mfxExtVPPRotation; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - - mfxU16 SliceSizeOverflow; - mfxU16 NumSliceNonCopliant; - mfxU16 NumEncodedSlice; - mfxU16 NumSliceSizeAlloc; - union { - mfxU16 *SliceSize; - mfxU64 reserved1; - }; - - mfxU16 reserved[20]; -} mfxExtEncodedSlicesInfo; -MFX_PACK_END() - -/* ScalingMode */ -enum { - MFX_SCALING_MODE_DEFAULT = 0, - MFX_SCALING_MODE_LOWPOWER = 1, - MFX_SCALING_MODE_QUALITY = 2 -}; - -#if (MFX_VERSION >= 1033) -/* Interpolation Method */ -enum { - MFX_INTERPOLATION_DEFAULT = 0, - MFX_INTERPOLATION_NEAREST_NEIGHBOR = 1, - MFX_INTERPOLATION_BILINEAR = 2, - MFX_INTERPOLATION_ADVANCED = 3 -}; -#endif - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 ScalingMode; -#if (MFX_VERSION >= 1033) - mfxU16 InterpolationMethod; - mfxU16 reserved[10]; -#else - mfxU16 reserved[11]; -#endif -} mfxExtVPPScaling; -MFX_PACK_END() - -#if (MFX_VERSION >= MFX_VERSION_NEXT) - -/* SceneChangeType */ -enum { - MFX_SCENE_NO_CHANGE = 0, - MFX_SCENE_START = 1, - MFX_SCENE_END = 2 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 Type; - mfxU16 reserved[11]; -} mfxExtSceneChange; -MFX_PACK_END() - -#endif - -typedef mfxExtAVCRefListCtrl mfxExtHEVCRefListCtrl; -typedef mfxExtAVCRefLists mfxExtHEVCRefLists; -typedef mfxExtAvcTemporalLayers mfxExtHEVCTemporalLayers; - -/* MirroringType */ -enum -{ - MFX_MIRRORING_DISABLED = 0, - MFX_MIRRORING_HORIZONTAL = 1, - MFX_MIRRORING_VERTICAL = 2 -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 Type; - mfxU16 reserved[11]; -} mfxExtVPPMirroring; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 StickTop; /* tri-state option */ - mfxU16 StickBottom; /* tri-state option */ - mfxU16 StickLeft; /* tri-state option */ - mfxU16 StickRight; /* tri-state option */ - mfxU16 reserved[8]; -} mfxExtMVOverPicBoundaries; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 Enable; /* tri-state option */ - mfxU16 reserved[11]; -} mfxExtVPPColorFill; -MFX_PACK_END() - -#if (MFX_VERSION >= 1025) - -/* ChromaSiting */ -enum { - MFX_CHROMA_SITING_UNKNOWN = 0x0000, - MFX_CHROMA_SITING_VERTICAL_TOP = 0x0001, /* Chroma samples are co-sited vertically on the top with the luma samples. */ - MFX_CHROMA_SITING_VERTICAL_CENTER = 0x0002, /* Chroma samples are not co-sited vertically with the luma samples. */ - MFX_CHROMA_SITING_VERTICAL_BOTTOM = 0x0004, /* Chroma samples are co-sited vertically on the bottom with the luma samples. */ - MFX_CHROMA_SITING_HORIZONTAL_LEFT = 0x0010, /* Chroma samples are co-sited horizontally on the left with the luma samples. */ - MFX_CHROMA_SITING_HORIZONTAL_CENTER = 0x0020 /* Chroma samples are not co-sited horizontally with the luma samples. */ -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 ChromaSiting; - mfxU16 reserved[27]; -} mfxExtColorConversion; -MFX_PACK_END() - -#endif - -#if (MFX_VERSION >= 1026) -/* VP9ReferenceFrame */ -enum { - MFX_VP9_REF_INTRA = 0, - MFX_VP9_REF_LAST = 1, - MFX_VP9_REF_GOLDEN = 2, - MFX_VP9_REF_ALTREF = 3 -}; - -/* SegmentIdBlockSize */ -enum { - MFX_VP9_SEGMENT_ID_BLOCK_SIZE_UNKNOWN = 0, - MFX_VP9_SEGMENT_ID_BLOCK_SIZE_8x8 = 8, - MFX_VP9_SEGMENT_ID_BLOCK_SIZE_16x16 = 16, - MFX_VP9_SEGMENT_ID_BLOCK_SIZE_32x32 = 32, - MFX_VP9_SEGMENT_ID_BLOCK_SIZE_64x64 = 64, -}; - -/* SegmentFeature */ -enum { - MFX_VP9_SEGMENT_FEATURE_QINDEX = 0x0001, - MFX_VP9_SEGMENT_FEATURE_LOOP_FILTER = 0x0002, - MFX_VP9_SEGMENT_FEATURE_REFERENCE = 0x0004, - MFX_VP9_SEGMENT_FEATURE_SKIP = 0x0008 /* (0,0) MV, no residual */ -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU16 FeatureEnabled; /* see enum SegmentFeature */ - mfxI16 QIndexDelta; - mfxI16 LoopFilterLevelDelta; - mfxU16 ReferenceFrame; /* see enum VP9ReferenceFrame */ - mfxU16 reserved[12]; -} mfxVP9SegmentParam; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - mfxU16 NumSegments; /* 0..8 */ - mfxVP9SegmentParam Segment[8]; - mfxU16 SegmentIdBlockSize; /* see enum SegmentIdBlockSize */ - mfxU32 NumSegmentIdAlloc; /* >= (Ceil(Width / SegmentIdBlockSize) * Ceil(Height / SegmentIdBlockSize)) */ - union { - mfxU8 *SegmentId; /*[NumSegmentIdAlloc] = 0..7, index in Segment array, blocks of SegmentIdBlockSize map */ - mfxU64 reserved1; - }; - mfxU16 reserved[52]; -} mfxExtVP9Segmentation; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU16 FrameRateScale; /* Layer[n].FrameRateScale = Layer[n - 1].FrameRateScale * (uint)m */ - mfxU16 TargetKbps; /* affected by BRCParamMultiplier, Layer[n].TargetKbps > Layer[n - 1].TargetKbps */ - mfxU16 reserved[14]; -} mfxVP9TemporalLayer; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxVP9TemporalLayer Layer[8]; - mfxU16 reserved[60]; -} mfxExtVP9TemporalLayers; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 FrameWidth; - mfxU16 FrameHeight; - - mfxU16 WriteIVFHeaders; /* tri-state option */ - -#if (MFX_VERSION >= MFX_VERSION_NEXT) - mfxI16 LoopFilterRefDelta[4]; - mfxI16 LoopFilterModeDelta[2]; -#else // API 1.26 - mfxI16 reserved1[6]; -#endif - mfxI16 QIndexDeltaLumaDC; - mfxI16 QIndexDeltaChromaAC; - mfxI16 QIndexDeltaChromaDC; -#if (MFX_VERSION >= 1029) - mfxU16 NumTileRows; - mfxU16 NumTileColumns; - mfxU16 reserved[110]; -#else - mfxU16 reserved[112]; -#endif -} mfxExtVP9Param; -MFX_PACK_END() - -#endif // #if (MFX_VERSION >= 1026) - -#if (MFX_VERSION >= 1025) -/* Multi-Frame Mode */ -enum { - MFX_MF_DEFAULT = 0, - MFX_MF_DISABLED = 1, - MFX_MF_AUTO = 2, - MFX_MF_MANUAL = 3 -}; - -/* Multi-Frame Initialization parameters */ -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU16 MFMode; - mfxU16 MaxNumFrames; - - mfxU16 reserved[58]; -} mfxExtMultiFrameParam; -MFX_PACK_END() - -/* Multi-Frame Run-time controls */ -MFX_PACK_BEGIN_USUAL_STRUCT() -MFX_DEPRECATED typedef struct { - mfxExtBuffer Header; - - mfxU32 Timeout; /* timeout in millisecond */ - mfxU16 Flush; /* Flush internal frame buffer, e.g. submit all collected frames. */ - - mfxU16 reserved[57]; -} mfxExtMultiFrameControl; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU16 Type; - mfxU16 reserved1; - mfxU32 Offset; - mfxU32 Size; - mfxU32 reserved[5]; -} mfxEncodedUnitInfo; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_L_TYPE() -typedef struct { - mfxExtBuffer Header; - - union { - mfxEncodedUnitInfo *UnitInfo; - mfxU64 reserved1; - }; - mfxU16 NumUnitsAlloc; - mfxU16 NumUnitsEncoded; - - mfxU16 reserved[22]; -} mfxExtEncodedUnitsInfo; -MFX_PACK_END() - -#endif - -#if (MFX_VERSION >= 1026) -#if (MFX_VERSION >= MFX_VERSION_NEXT) -/* MCTFTemporalMode */ -enum { - MFX_MCTF_TEMPORAL_MODE_UNKNOWN = 0, - MFX_MCTF_TEMPORAL_MODE_SPATIAL = 1, - MFX_MCTF_TEMPORAL_MODE_1REF = 2, - MFX_MCTF_TEMPORAL_MODE_2REF = 3, - MFX_MCTF_TEMPORAL_MODE_4REF = 4 -}; -#endif - -/* MCTF initialization & runtime */ -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU16 FilterStrength; -#if (MFX_VERSION >= MFX_VERSION_NEXT) - mfxU16 Overlap; /* tri-state option */ - mfxU32 BitsPerPixelx100k; - mfxU16 Deblocking; /* tri-state option */ - mfxU16 TemporalMode; - mfxU16 MVPrecision; - mfxU16 reserved[21]; -#else - mfxU16 reserved[27]; -#endif -} mfxExtVppMctf; -MFX_PACK_END() - -#endif - -#if (MFX_VERSION >= 1031) -/* Multi-adapters Querying structs */ -typedef enum -{ - MFX_COMPONENT_ENCODE = 1, - MFX_COMPONENT_DECODE = 2, - MFX_COMPONENT_VPP = 3 -} mfxComponentType; - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct -{ - mfxComponentType Type; - mfxVideoParam Requirements; - - mfxU16 reserved[4]; -} mfxComponentInfo; -MFX_PACK_END() - -/* Adapter description */ -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct -{ - mfxPlatform Platform; - mfxU32 Number; - - mfxU16 reserved[14]; -} mfxAdapterInfo; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct -{ - mfxAdapterInfo * Adapters; - mfxU32 NumAlloc; - mfxU32 NumActual; - - mfxU16 reserved[4]; -} mfxAdaptersInfo; -MFX_PACK_END() - -#endif - -#if (MFX_VERSION >= 1034) -/* FilmGrainFlags */ -enum { - MFX_FILM_GRAIN_APPLY = (1 << 0), - MFX_FILM_GRAIN_UPDATE = (1 << 1), - MFX_FILM_GRAIN_CHROMA_SCALING_FROM_LUMA = (1 << 2), - MFX_FILM_GRAIN_OVERLAP = (1 << 3), - MFX_FILM_GRAIN_CLIP_TO_RESTRICTED_RANGE = (1 << 4) -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxU8 Value; - mfxU8 Scaling; -} mfxAV1FilmGrainPoint; -MFX_PACK_END() - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 FilmGrainFlags; /* FilmGrainFlags */ - mfxU16 GrainSeed; /* 0..65535 */ - - mfxU8 RefIdx; /* 0..6 */ - mfxU8 NumYPoints; /* 0..14 */ - mfxU8 NumCbPoints; /* 0..10 */ - mfxU8 NumCrPoints; /* 0..10 */ - - mfxAV1FilmGrainPoint PointY[14]; - mfxAV1FilmGrainPoint PointCb[10]; - mfxAV1FilmGrainPoint PointCr[10]; - - mfxU8 GrainScalingMinus8; /* 0..3 */ - mfxU8 ArCoeffLag; /* 0..3 */ - - mfxU8 ArCoeffsYPlus128[24]; /* 0..255 */ - mfxU8 ArCoeffsCbPlus128[25]; /* 0..255 */ - mfxU8 ArCoeffsCrPlus128[25]; /* 0..255 */ - - mfxU8 ArCoeffShiftMinus6; /* 0..3 */ - mfxU8 GrainScaleShift; /* 0..3 */ - - mfxU8 CbMult; /* 0..255 */ - mfxU8 CbLumaMult; /* 0..255 */ - mfxU16 CbOffset; /* 0..511 */ - - mfxU8 CrMult; /* 0..255 */ - mfxU8 CrLumaMult; /* 0..255 */ - mfxU16 CrOffset; /* 0..511 */ - - mfxU16 reserved[43]; -} mfxExtAV1FilmGrainParam; -MFX_PACK_END() - -#endif - -#if (MFX_VERSION >= 1031) -/* PartialBitstreamOutput */ -enum { - MFX_PARTIAL_BITSTREAM_NONE = 0, /* Don't use partial output */ - MFX_PARTIAL_BITSTREAM_SLICE = 1, /* Partial bitstream output will be aligned to slice granularity */ - MFX_PARTIAL_BITSTREAM_BLOCK = 2, /* Partial bitstream output will be aligned to user-defined block size granularity */ - MFX_PARTIAL_BITSTREAM_ANY = 3 /* Partial bitstream output will be return any coded data avilable at the end of SyncOperation timeout */ -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - mfxU32 BlockSize; /* output block granulatiry for Granularity = MFX_PARTIAL_BITSTREAM_BLOCK */ - mfxU16 Granularity; /* granulatiry of the partial bitstream: slice/block/any */ - mfxU16 reserved[8]; -} mfxExtPartialBitstreamParam; -MFX_PACK_END() -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/.github/actions/libmfx/include/mfx/mfxvideo++.h b/.github/actions/libmfx/include/mfx/mfxvideo++.h deleted file mode 100644 index 6dd63a3..0000000 --- a/.github/actions/libmfx/include/mfx/mfxvideo++.h +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) 2017 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#ifndef __MFXVIDEOPLUSPLUS_H -#define __MFXVIDEOPLUSPLUS_H - -#include "mfxvideo.h" -#include "mfxenc.h" -#include "mfxpak.h" - -class MFXVideoSession -{ -public: - MFXVideoSession(void) { m_session = (mfxSession) 0; } - virtual ~MFXVideoSession(void) { Close(); } - - virtual mfxStatus Init(mfxIMPL impl, mfxVersion *ver) { return MFXInit(impl, ver, &m_session); } - virtual mfxStatus InitEx(mfxInitParam par) { return MFXInitEx(par, &m_session); } - virtual mfxStatus Close(void) - { - mfxStatus mfxRes; - mfxRes = MFXClose(m_session); m_session = (mfxSession) 0; - return mfxRes; - } - - virtual mfxStatus QueryIMPL(mfxIMPL *impl) { return MFXQueryIMPL(m_session, impl); } - virtual mfxStatus QueryVersion(mfxVersion *version) { return MFXQueryVersion(m_session, version); } - - virtual mfxStatus JoinSession(mfxSession child_session) { return MFXJoinSession(m_session, child_session);} - virtual mfxStatus DisjoinSession( ) { return MFXDisjoinSession(m_session);} - virtual mfxStatus CloneSession( mfxSession *clone) { return MFXCloneSession(m_session, clone);} - virtual mfxStatus SetPriority( mfxPriority priority) { return MFXSetPriority(m_session, priority);} - virtual mfxStatus GetPriority( mfxPriority *priority) { return MFXGetPriority(m_session, priority);} - - MFX_DEPRECATED virtual mfxStatus SetBufferAllocator(mfxBufferAllocator *allocator) { return MFXVideoCORE_SetBufferAllocator(m_session, allocator); } - virtual mfxStatus SetFrameAllocator(mfxFrameAllocator *allocator) { return MFXVideoCORE_SetFrameAllocator(m_session, allocator); } - virtual mfxStatus SetHandle(mfxHandleType type, mfxHDL hdl) { return MFXVideoCORE_SetHandle(m_session, type, hdl); } - virtual mfxStatus GetHandle(mfxHandleType type, mfxHDL *hdl) { return MFXVideoCORE_GetHandle(m_session, type, hdl); } - virtual mfxStatus QueryPlatform(mfxPlatform* platform) { return MFXVideoCORE_QueryPlatform(m_session, platform); } - - virtual mfxStatus SyncOperation(mfxSyncPoint syncp, mfxU32 wait) { return MFXVideoCORE_SyncOperation(m_session, syncp, wait); } - - virtual mfxStatus DoWork() { return MFXDoWork(m_session); } - - virtual operator mfxSession (void) { return m_session; } - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -private: - MFXVideoSession(const MFXVideoSession &); - void operator=(MFXVideoSession &); -}; - -class MFXVideoENCODE -{ -public: - - MFXVideoENCODE(mfxSession session) { m_session = session; } - virtual ~MFXVideoENCODE(void) { Close(); } - - virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoENCODE_Query(m_session, in, out); } - virtual mfxStatus QueryIOSurf(mfxVideoParam *par, mfxFrameAllocRequest *request) { return MFXVideoENCODE_QueryIOSurf(m_session, par, request); } - virtual mfxStatus Init(mfxVideoParam *par) { return MFXVideoENCODE_Init(m_session, par); } - virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoENCODE_Reset(m_session, par); } - virtual mfxStatus Close(void) { return MFXVideoENCODE_Close(m_session); } - - virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoENCODE_GetVideoParam(m_session, par); } - virtual mfxStatus GetEncodeStat(mfxEncodeStat *stat) { return MFXVideoENCODE_GetEncodeStat(m_session, stat); } - - virtual mfxStatus EncodeFrameAsync(mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxSyncPoint *syncp) { return MFXVideoENCODE_EncodeFrameAsync(m_session, ctrl, surface, bs, syncp); } - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -}; - -class MFXVideoDECODE -{ -public: - - MFXVideoDECODE(mfxSession session) { m_session = session; } - virtual ~MFXVideoDECODE(void) { Close(); } - - virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoDECODE_Query(m_session, in, out); } - virtual mfxStatus DecodeHeader(mfxBitstream *bs, mfxVideoParam *par) { return MFXVideoDECODE_DecodeHeader(m_session, bs, par); } - virtual mfxStatus QueryIOSurf(mfxVideoParam *par, mfxFrameAllocRequest *request) { return MFXVideoDECODE_QueryIOSurf(m_session, par, request); } - virtual mfxStatus Init(mfxVideoParam *par) { return MFXVideoDECODE_Init(m_session, par); } - virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoDECODE_Reset(m_session, par); } - virtual mfxStatus Close(void) { return MFXVideoDECODE_Close(m_session); } - - virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoDECODE_GetVideoParam(m_session, par); } - - virtual mfxStatus GetDecodeStat(mfxDecodeStat *stat) { return MFXVideoDECODE_GetDecodeStat(m_session, stat); } - virtual mfxStatus GetPayload(mfxU64 *ts, mfxPayload *payload) {return MFXVideoDECODE_GetPayload(m_session, ts, payload); } - virtual mfxStatus SetSkipMode(mfxSkipMode mode) { return MFXVideoDECODE_SetSkipMode(m_session, mode); } - virtual mfxStatus DecodeFrameAsync(mfxBitstream *bs, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxSyncPoint *syncp) { return MFXVideoDECODE_DecodeFrameAsync(m_session, bs, surface_work, surface_out, syncp); } - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -}; - -class MFXVideoVPP -{ -public: - - MFXVideoVPP(mfxSession session) { m_session = session; } - virtual ~MFXVideoVPP(void) { Close(); } - - virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoVPP_Query(m_session, in, out); } - virtual mfxStatus QueryIOSurf(mfxVideoParam *par, mfxFrameAllocRequest request[2]) { return MFXVideoVPP_QueryIOSurf(m_session, par, request); } - virtual mfxStatus Init(mfxVideoParam *par) { return MFXVideoVPP_Init(m_session, par); } - virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoVPP_Reset(m_session, par); } - virtual mfxStatus Close(void) { return MFXVideoVPP_Close(m_session); } - - virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoVPP_GetVideoParam(m_session, par); } - virtual mfxStatus GetVPPStat(mfxVPPStat *stat) { return MFXVideoVPP_GetVPPStat(m_session, stat); } - virtual mfxStatus RunFrameVPPAsync(mfxFrameSurface1 *in, mfxFrameSurface1 *out, mfxExtVppAuxData *aux, mfxSyncPoint *syncp) { return MFXVideoVPP_RunFrameVPPAsync(m_session, in, out, aux, syncp); } - virtual mfxStatus RunFrameVPPAsyncEx(mfxFrameSurface1 *in, mfxFrameSurface1 *work, mfxFrameSurface1 **out, mfxSyncPoint *syncp) {return MFXVideoVPP_RunFrameVPPAsyncEx(m_session, in, work, out, syncp); } - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -}; - -class MFXVideoENC -{ -public: - - MFXVideoENC(mfxSession session) { m_session = session; } - virtual ~MFXVideoENC(void) { Close(); } - - virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoENC_Query(m_session, in, out); } - virtual mfxStatus QueryIOSurf(mfxVideoParam *par, mfxFrameAllocRequest *request) { return MFXVideoENC_QueryIOSurf(m_session, par, request); } - virtual mfxStatus Init(mfxVideoParam *par) { return MFXVideoENC_Init(m_session, par); } - virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoENC_Reset(m_session, par); } - virtual mfxStatus Close(void) { return MFXVideoENC_Close(m_session); } - - virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoENC_GetVideoParam(m_session, par); } - virtual mfxStatus ProcessFrameAsync(mfxENCInput *in, mfxENCOutput *out, mfxSyncPoint *syncp) { return MFXVideoENC_ProcessFrameAsync(m_session, in, out, syncp); } - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -}; - -class MFXVideoPAK -{ -public: - - MFXVideoPAK(mfxSession session) { m_session = session; } - virtual ~MFXVideoPAK(void) { Close(); } - - virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoPAK_Query(m_session, in, out); } - virtual mfxStatus QueryIOSurf(mfxVideoParam *par, mfxFrameAllocRequest *request) { return MFXVideoPAK_QueryIOSurf(m_session, par, request); } - virtual mfxStatus Init(mfxVideoParam *par) { return MFXVideoPAK_Init(m_session, par); } - virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoPAK_Reset(m_session, par); } - virtual mfxStatus Close(void) { return MFXVideoPAK_Close(m_session); } - - virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoPAK_GetVideoParam(m_session, par); } - //virtual mfxStatus GetEncodeStat(mfxEncodeStat *stat) { return MFXVideoENCODE_GetEncodeStat(m_session, stat); } - - virtual mfxStatus ProcessFrameAsync(mfxPAKInput *in, mfxPAKOutput *out, mfxSyncPoint *syncp) { return MFXVideoPAK_ProcessFrameAsync(m_session, in, out, syncp); } - -protected: - - mfxSession m_session; // (mfxSession) handle to the owning session -}; - -#endif // __MFXVIDEOPLUSPLUS_H diff --git a/.github/actions/libmfx/include/mfx/mfxvideo.h b/.github/actions/libmfx/include/mfx/mfxvideo.h deleted file mode 100644 index 5e4ec00..0000000 --- a/.github/actions/libmfx/include/mfx/mfxvideo.h +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2017-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXVIDEO_H__ -#define __MFXVIDEO_H__ -#include "mfxsession.h" -#include "mfxvstructures.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* MFXVideoCORE */ -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxU32 reserved[4]; - mfxHDL pthis; - mfxStatus (MFX_CDECL *Alloc) (mfxHDL pthis, mfxU32 nbytes, mfxU16 type, mfxMemId *mid); - mfxStatus (MFX_CDECL *Lock) (mfxHDL pthis, mfxMemId mid, mfxU8 **ptr); - mfxStatus (MFX_CDECL *Unlock) (mfxHDL pthis, mfxMemId mid); - mfxStatus (MFX_CDECL *Free) (mfxHDL pthis, mfxMemId mid); -} mfxBufferAllocator; -MFX_PACK_END() - -MFX_PACK_BEGIN_STRUCT_W_PTR() -typedef struct { - mfxU32 reserved[4]; - mfxHDL pthis; - - mfxStatus (MFX_CDECL *Alloc) (mfxHDL pthis, mfxFrameAllocRequest *request, mfxFrameAllocResponse *response); - mfxStatus (MFX_CDECL *Lock) (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr); - mfxStatus (MFX_CDECL *Unlock) (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr); - mfxStatus (MFX_CDECL *GetHDL) (mfxHDL pthis, mfxMemId mid, mfxHDL *handle); - mfxStatus (MFX_CDECL *Free) (mfxHDL pthis, mfxFrameAllocResponse *response); -} mfxFrameAllocator; -MFX_PACK_END() - -/* VideoCORE */ -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoCORE_SetBufferAllocator(mfxSession session, mfxBufferAllocator *allocator); -mfxStatus MFX_CDECL MFXVideoCORE_SetFrameAllocator(mfxSession session, mfxFrameAllocator *allocator); -mfxStatus MFX_CDECL MFXVideoCORE_SetHandle(mfxSession session, mfxHandleType type, mfxHDL hdl); -mfxStatus MFX_CDECL MFXVideoCORE_GetHandle(mfxSession session, mfxHandleType type, mfxHDL *hdl); -mfxStatus MFX_CDECL MFXVideoCORE_QueryPlatform(mfxSession session, mfxPlatform* platform); -mfxStatus MFX_CDECL MFXVideoCORE_SyncOperation(mfxSession session, mfxSyncPoint syncp, mfxU32 wait); - -/* VideoENCODE */ -mfxStatus MFX_CDECL MFXVideoENCODE_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); -mfxStatus MFX_CDECL MFXVideoENCODE_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest *request); -mfxStatus MFX_CDECL MFXVideoENCODE_Init(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoENCODE_Reset(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoENCODE_Close(mfxSession session); - -mfxStatus MFX_CDECL MFXVideoENCODE_GetVideoParam(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoENCODE_GetEncodeStat(mfxSession session, mfxEncodeStat *stat); -mfxStatus MFX_CDECL MFXVideoENCODE_EncodeFrameAsync(mfxSession session, mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxSyncPoint *syncp); - -/* VideoDECODE */ -mfxStatus MFX_CDECL MFXVideoDECODE_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); -mfxStatus MFX_CDECL MFXVideoDECODE_DecodeHeader(mfxSession session, mfxBitstream *bs, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoDECODE_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest *request); -mfxStatus MFX_CDECL MFXVideoDECODE_Init(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoDECODE_Reset(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoDECODE_Close(mfxSession session); - -mfxStatus MFX_CDECL MFXVideoDECODE_GetVideoParam(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoDECODE_GetDecodeStat(mfxSession session, mfxDecodeStat *stat); -mfxStatus MFX_CDECL MFXVideoDECODE_SetSkipMode(mfxSession session, mfxSkipMode mode); -mfxStatus MFX_CDECL MFXVideoDECODE_GetPayload(mfxSession session, mfxU64 *ts, mfxPayload *payload); -mfxStatus MFX_CDECL MFXVideoDECODE_DecodeFrameAsync(mfxSession session, mfxBitstream *bs, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxSyncPoint *syncp); - -/* VideoVPP */ -mfxStatus MFX_CDECL MFXVideoVPP_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); -mfxStatus MFX_CDECL MFXVideoVPP_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest request[2]); -mfxStatus MFX_CDECL MFXVideoVPP_Init(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoVPP_Reset(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoVPP_Close(mfxSession session); - -mfxStatus MFX_CDECL MFXVideoVPP_GetVideoParam(mfxSession session, mfxVideoParam *par); -mfxStatus MFX_CDECL MFXVideoVPP_GetVPPStat(mfxSession session, mfxVPPStat *stat); -mfxStatus MFX_CDECL MFXVideoVPP_RunFrameVPPAsync(mfxSession session, mfxFrameSurface1 *in, mfxFrameSurface1 *out, mfxExtVppAuxData *aux, mfxSyncPoint *syncp); -MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoVPP_RunFrameVPPAsyncEx(mfxSession session, mfxFrameSurface1 *in, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxSyncPoint *syncp); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/.github/actions/libmfx/include/mfx/mfxvp8.h b/.github/actions/libmfx/include/mfx/mfxvp8.h deleted file mode 100644 index 7281402..0000000 --- a/.github/actions/libmfx/include/mfx/mfxvp8.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2017-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXVP8_H__ -#define __MFXVP8_H__ - -#include "mfxdefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - MFX_CODEC_VP8 = MFX_MAKEFOURCC('V','P','8',' '), -}; - -/* CodecProfile*/ -enum { - MFX_PROFILE_VP8_0 = 0+1, - MFX_PROFILE_VP8_1 = 1+1, - MFX_PROFILE_VP8_2 = 2+1, - MFX_PROFILE_VP8_3 = 3+1, -}; - -/* Extended Buffer Ids */ -enum { - MFX_EXTBUFF_VP8_CODING_OPTION = MFX_MAKEFOURCC('V','P','8','E'), -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 Version; - mfxU16 EnableMultipleSegments; - mfxU16 LoopFilterType; - mfxU16 LoopFilterLevel[4]; - mfxU16 SharpnessLevel; - mfxU16 NumTokenPartitions; - mfxI16 LoopFilterRefTypeDelta[4]; - mfxI16 LoopFilterMbModeDelta[4]; - mfxI16 SegmentQPDelta[4]; - mfxI16 CoeffTypeQPDelta[5]; - mfxU16 WriteIVFHeaders; - mfxU32 NumFramesForIVFHeader; - mfxU16 reserved[223]; -} mfxExtVP8CodingOption; -MFX_PACK_END() - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxvp9.h b/.github/actions/libmfx/include/mfx/mfxvp9.h deleted file mode 100644 index 05e47ee..0000000 --- a/.github/actions/libmfx/include/mfx/mfxvp9.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2018-2019 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#ifndef __MFXVP9_H__ -#define __MFXVP9_H__ - -#include "mfxdefs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if (MFX_VERSION >= MFX_VERSION_NEXT) - -/* Extended Buffer Ids */ -enum { - MFX_EXTBUFF_VP9_DECODED_FRAME_INFO = MFX_MAKEFOURCC('9','D','F','I') -}; - -MFX_PACK_BEGIN_USUAL_STRUCT() -typedef struct { - mfxExtBuffer Header; - - mfxU16 DisplayWidth; - mfxU16 DisplayHeight; - mfxU16 reserved[58]; -} mfxExtVP9DecodedFrameInfo; -MFX_PACK_END() - -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif - diff --git a/.github/actions/libmfx/include/mfx/mfxvstructures.h b/.github/actions/libmfx/include/mfx/mfxvstructures.h deleted file mode 100644 index a4dda16..0000000 --- a/.github/actions/libmfx/include/mfx/mfxvstructures.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2017 Intel Corporation -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -#include "mfxstructures.h" - -