updating mfx

This commit is contained in:
Daniel Stankewitz 2022-09-25 16:40:32 +02:00
parent 105f314c8e
commit c5660a2fe3
30 changed files with 6774 additions and 6773 deletions

View File

@ -1,40 +1,40 @@
// Copyright (c) 2019-2020 Intel Corporation // Copyright (c) 2019-2020 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#include "mfxdefs.h" #include "mfxdefs.h"
#if (MFX_VERSION >= 1031) #if (MFX_VERSION >= 1031)
#ifndef __MFXADAPTER_H__ #ifndef __MFXADAPTER_H__
#define __MFXADAPTER_H__ #define __MFXADAPTER_H__
#include "mfxstructures.h" #include "mfxstructures.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersInfo* adapters); mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersInfo* adapters);
mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec_id, mfxAdaptersInfo* adapters); mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec_id, mfxAdaptersInfo* adapters);
mfxStatus MFX_CDECL MFXQueryAdaptersNumber(mfxU32* num_adapters); mfxStatus MFX_CDECL MFXQueryAdaptersNumber(mfxU32* num_adapters);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif // __MFXADAPTER_H__ #endif // __MFXADAPTER_H__
#endif #endif

View File

@ -1,170 +1,170 @@
// Copyright (c) 2017-2019 Intel Corporation // Copyright (c) 2017-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXASTRUCTURES_H__ #ifndef __MFXASTRUCTURES_H__
#define __MFXASTRUCTURES_H__ #define __MFXASTRUCTURES_H__
#include "mfxcommon.h" #include "mfxcommon.h"
#if !defined (__GNUC__) #if !defined (__GNUC__)
#pragma warning(disable: 4201) #pragma warning(disable: 4201)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* CodecId */ /* CodecId */
enum { enum {
MFX_CODEC_AAC =MFX_MAKEFOURCC('A','A','C',' '), MFX_CODEC_AAC =MFX_MAKEFOURCC('A','A','C',' '),
MFX_CODEC_MP3 =MFX_MAKEFOURCC('M','P','3',' ') MFX_CODEC_MP3 =MFX_MAKEFOURCC('M','P','3',' ')
}; };
enum { enum {
/* AAC Profiles & Levels */ /* AAC Profiles & Levels */
MFX_PROFILE_AAC_LC =2, MFX_PROFILE_AAC_LC =2,
MFX_PROFILE_AAC_LTP =4, MFX_PROFILE_AAC_LTP =4,
MFX_PROFILE_AAC_MAIN =1, MFX_PROFILE_AAC_MAIN =1,
MFX_PROFILE_AAC_SSR =3, MFX_PROFILE_AAC_SSR =3,
MFX_PROFILE_AAC_HE =5, MFX_PROFILE_AAC_HE =5,
MFX_PROFILE_AAC_ALS =0x20, MFX_PROFILE_AAC_ALS =0x20,
MFX_PROFILE_AAC_BSAC =22, MFX_PROFILE_AAC_BSAC =22,
MFX_PROFILE_AAC_PS =29, MFX_PROFILE_AAC_PS =29,
/*MPEG AUDIO*/ /*MPEG AUDIO*/
MFX_AUDIO_MPEG1_LAYER1 =0x00000110, MFX_AUDIO_MPEG1_LAYER1 =0x00000110,
MFX_AUDIO_MPEG1_LAYER2 =0x00000120, MFX_AUDIO_MPEG1_LAYER2 =0x00000120,
MFX_AUDIO_MPEG1_LAYER3 =0x00000140, MFX_AUDIO_MPEG1_LAYER3 =0x00000140,
MFX_AUDIO_MPEG2_LAYER1 =0x00000210, MFX_AUDIO_MPEG2_LAYER1 =0x00000210,
MFX_AUDIO_MPEG2_LAYER2 =0x00000220, MFX_AUDIO_MPEG2_LAYER2 =0x00000220,
MFX_AUDIO_MPEG2_LAYER3 =0x00000240 MFX_AUDIO_MPEG2_LAYER3 =0x00000240
}; };
/*AAC HE decoder down sampling*/ /*AAC HE decoder down sampling*/
enum { enum {
MFX_AUDIO_AAC_HE_DWNSMPL_OFF=0, MFX_AUDIO_AAC_HE_DWNSMPL_OFF=0,
MFX_AUDIO_AAC_HE_DWNSMPL_ON= 1 MFX_AUDIO_AAC_HE_DWNSMPL_ON= 1
}; };
/* AAC decoder support of PS */ /* AAC decoder support of PS */
enum { enum {
MFX_AUDIO_AAC_PS_DISABLE= 0, MFX_AUDIO_AAC_PS_DISABLE= 0,
MFX_AUDIO_AAC_PS_PARSER= 1, MFX_AUDIO_AAC_PS_PARSER= 1,
MFX_AUDIO_AAC_PS_ENABLE_BL= 111, MFX_AUDIO_AAC_PS_ENABLE_BL= 111,
MFX_AUDIO_AAC_PS_ENABLE_UR= 411 MFX_AUDIO_AAC_PS_ENABLE_UR= 411
}; };
/*AAC decoder SBR support*/ /*AAC decoder SBR support*/
enum { enum {
MFX_AUDIO_AAC_SBR_DISABLE = 0, MFX_AUDIO_AAC_SBR_DISABLE = 0,
MFX_AUDIO_AAC_SBR_ENABLE= 1, MFX_AUDIO_AAC_SBR_ENABLE= 1,
MFX_AUDIO_AAC_SBR_UNDEF= 2 MFX_AUDIO_AAC_SBR_UNDEF= 2
}; };
/*AAC header type*/ /*AAC header type*/
enum{ enum{
MFX_AUDIO_AAC_ADTS= 1, MFX_AUDIO_AAC_ADTS= 1,
MFX_AUDIO_AAC_ADIF= 2, MFX_AUDIO_AAC_ADIF= 2,
MFX_AUDIO_AAC_RAW= 3, MFX_AUDIO_AAC_RAW= 3,
}; };
/*AAC encoder stereo mode*/ /*AAC encoder stereo mode*/
enum enum
{ {
MFX_AUDIO_AAC_MONO= 0, MFX_AUDIO_AAC_MONO= 0,
MFX_AUDIO_AAC_LR_STEREO= 1, MFX_AUDIO_AAC_LR_STEREO= 1,
MFX_AUDIO_AAC_MS_STEREO= 2, MFX_AUDIO_AAC_MS_STEREO= 2,
MFX_AUDIO_AAC_JOINT_STEREO= 3 MFX_AUDIO_AAC_JOINT_STEREO= 3
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxU32 CodecId; mfxU32 CodecId;
mfxU16 CodecProfile; mfxU16 CodecProfile;
mfxU16 CodecLevel; mfxU16 CodecLevel;
mfxU32 Bitrate; mfxU32 Bitrate;
mfxU32 SampleFrequency; mfxU32 SampleFrequency;
mfxU16 NumChannel; mfxU16 NumChannel;
mfxU16 BitPerSample; mfxU16 BitPerSample;
mfxU16 reserved1[22]; mfxU16 reserved1[22];
union { union {
struct { /* AAC Decoding Options */ struct { /* AAC Decoding Options */
mfxU16 FlagPSSupportLev; mfxU16 FlagPSSupportLev;
mfxU16 Layer; mfxU16 Layer;
mfxU16 AACHeaderDataSize; mfxU16 AACHeaderDataSize;
mfxU8 AACHeaderData[64]; mfxU8 AACHeaderData[64];
}; };
struct { /* AAC Encoding Options */ struct { /* AAC Encoding Options */
mfxU16 OutputFormat; mfxU16 OutputFormat;
mfxU16 StereoMode; mfxU16 StereoMode;
mfxU16 reserved2[61]; mfxU16 reserved2[61];
}; };
}; };
} mfxAudioInfoMFX; } mfxAudioInfoMFX;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxU16 AsyncDepth; mfxU16 AsyncDepth;
mfxU16 Protected; mfxU16 Protected;
mfxU16 reserved[14]; mfxU16 reserved[14];
mfxAudioInfoMFX mfx; mfxAudioInfoMFX mfx;
mfxExtBuffer** ExtParam; mfxExtBuffer** ExtParam;
mfxU16 NumExtParam; mfxU16 NumExtParam;
} mfxAudioParam; } mfxAudioParam;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxU32 SuggestedInputSize; mfxU32 SuggestedInputSize;
mfxU32 SuggestedOutputSize; mfxU32 SuggestedOutputSize;
mfxU32 reserved[6]; mfxU32 reserved[6];
} mfxAudioAllocRequest; } mfxAudioAllocRequest;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_STRUCT_W_L_TYPE()
typedef struct { typedef struct {
mfxU64 TimeStamp; /* 1/90KHz */ mfxU64 TimeStamp; /* 1/90KHz */
mfxU16 Locked; mfxU16 Locked;
mfxU16 NumChannels; mfxU16 NumChannels;
mfxU32 SampleFrequency; mfxU32 SampleFrequency;
mfxU16 BitPerSample; mfxU16 BitPerSample;
mfxU16 reserved1[7]; mfxU16 reserved1[7];
mfxU8* Data; mfxU8* Data;
mfxU32 reserved2; mfxU32 reserved2;
mfxU32 DataLength; mfxU32 DataLength;
mfxU32 MaxLength; mfxU32 MaxLength;
mfxU32 NumExtParam; mfxU32 NumExtParam;
mfxExtBuffer **ExtParam; mfxExtBuffer **ExtParam;
} mfxAudioFrame; } mfxAudioFrame;
MFX_PACK_END() MFX_PACK_END()
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif

View File

@ -1,101 +1,101 @@
// Copyright (c) 2017 Intel Corporation // Copyright (c) 2017 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXAUDIOPLUSPLUS_H #ifndef __MFXAUDIOPLUSPLUS_H
#define __MFXAUDIOPLUSPLUS_H #define __MFXAUDIOPLUSPLUS_H
#include "mfxaudio.h" #include "mfxaudio.h"
class MFXAudioSession class MFXAudioSession
{ {
public: public:
MFXAudioSession(void) { m_session = (mfxSession) 0; } MFXAudioSession(void) { m_session = (mfxSession) 0; }
virtual ~MFXAudioSession(void) { Close(); } virtual ~MFXAudioSession(void) { Close(); }
virtual mfxStatus Init(mfxIMPL impl, mfxVersion *ver) { return MFXInit(impl, ver, &m_session); } virtual mfxStatus Init(mfxIMPL impl, mfxVersion *ver) { return MFXInit(impl, ver, &m_session); }
virtual mfxStatus Close(void) virtual mfxStatus Close(void)
{ {
mfxStatus mfxRes; mfxStatus mfxRes;
mfxRes = MFXClose(m_session); m_session = (mfxSession) 0; mfxRes = MFXClose(m_session); m_session = (mfxSession) 0;
return mfxRes; return mfxRes;
} }
virtual mfxStatus QueryIMPL(mfxIMPL *impl) { return MFXQueryIMPL(m_session, impl); } virtual mfxStatus QueryIMPL(mfxIMPL *impl) { return MFXQueryIMPL(m_session, impl); }
virtual mfxStatus QueryVersion(mfxVersion *version) { return MFXQueryVersion(m_session, version); } virtual mfxStatus QueryVersion(mfxVersion *version) { return MFXQueryVersion(m_session, version); }
virtual mfxStatus JoinSession(mfxSession child_session) { return MFXJoinSession(m_session, child_session);} virtual mfxStatus JoinSession(mfxSession child_session) { return MFXJoinSession(m_session, child_session);}
virtual mfxStatus DisjoinSession( ) { return MFXDisjoinSession(m_session);} virtual mfxStatus DisjoinSession( ) { return MFXDisjoinSession(m_session);}
virtual mfxStatus CloneSession( mfxSession *clone) { return MFXCloneSession(m_session, clone);} virtual mfxStatus CloneSession( mfxSession *clone) { return MFXCloneSession(m_session, clone);}
virtual mfxStatus SetPriority( mfxPriority priority) { return MFXSetPriority(m_session, priority);} virtual mfxStatus SetPriority( mfxPriority priority) { return MFXSetPriority(m_session, priority);}
virtual mfxStatus GetPriority( mfxPriority *priority) { return MFXGetPriority(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 mfxStatus SyncOperation(mfxSyncPoint syncp, mfxU32 wait) { return MFXAudioCORE_SyncOperation(m_session, syncp, wait); }
virtual operator mfxSession (void) { return m_session; } virtual operator mfxSession (void) { return m_session; }
protected: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
}; };
class MFXAudioDECODE class MFXAudioDECODE
{ {
public: public:
MFXAudioDECODE(mfxSession session) { m_session = session; } MFXAudioDECODE(mfxSession session) { m_session = session; }
virtual ~MFXAudioDECODE(void) { Close(); } virtual ~MFXAudioDECODE(void) { Close(); }
virtual mfxStatus Query(mfxAudioParam *in, mfxAudioParam *out) { return MFXAudioDECODE_Query(m_session, in, out); } 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 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 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 Init(mfxAudioParam *par) { return MFXAudioDECODE_Init(m_session, par); }
virtual mfxStatus Reset(mfxAudioParam *par) { return MFXAudioDECODE_Reset(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 Close(void) { return MFXAudioDECODE_Close(m_session); }
virtual mfxStatus GetAudioParam(mfxAudioParam *par) { return MFXAudioDECODE_GetAudioParam(m_session, par); } 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); } virtual mfxStatus DecodeFrameAsync(mfxBitstream *bs, mfxAudioFrame *frame, mfxSyncPoint *syncp) { return MFXAudioDECODE_DecodeFrameAsync(m_session, bs, frame, syncp); }
protected: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
}; };
class MFXAudioENCODE class MFXAudioENCODE
{ {
public: public:
MFXAudioENCODE(mfxSession session) { m_session = session; } MFXAudioENCODE(mfxSession session) { m_session = session; }
virtual ~MFXAudioENCODE(void) { Close(); } virtual ~MFXAudioENCODE(void) { Close(); }
virtual mfxStatus Query(mfxAudioParam *in, mfxAudioParam *out) { return MFXAudioENCODE_Query(m_session, in, out); } 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 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 Init(mfxAudioParam *par) { return MFXAudioENCODE_Init(m_session, par); }
virtual mfxStatus Reset(mfxAudioParam *par) { return MFXAudioENCODE_Reset(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 Close(void) { return MFXAudioENCODE_Close(m_session); }
virtual mfxStatus GetAudioParam(mfxAudioParam *par) { return MFXAudioENCODE_GetAudioParam(m_session, par); } 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); } virtual mfxStatus EncodeFrameAsync(mfxAudioFrame *frame, mfxBitstream *buffer_out, mfxSyncPoint *syncp) { return MFXAudioENCODE_EncodeFrameAsync(m_session, frame, buffer_out, syncp); }
protected: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
}; };
#endif #endif

View File

@ -1,60 +1,60 @@
// Copyright (c) 2017 Intel Corporation // Copyright (c) 2017 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXAUDIO_H__ #ifndef __MFXAUDIO_H__
#define __MFXAUDIO_H__ #define __MFXAUDIO_H__
#include "mfxsession.h" #include "mfxsession.h"
#include "mfxastructures.h" #include "mfxastructures.h"
#define MFX_AUDIO_VERSION_MAJOR 1 #define MFX_AUDIO_VERSION_MAJOR 1
#define MFX_AUDIO_VERSION_MINOR 15 #define MFX_AUDIO_VERSION_MINOR 15
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/* AudioCORE */ /* AudioCORE */
mfxStatus MFX_CDECL MFXAudioCORE_SyncOperation(mfxSession session, mfxSyncPoint syncp, mfxU32 wait); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioCORE_SyncOperation(mfxSession session, mfxSyncPoint syncp, mfxU32 wait);
/* AudioENCODE */ /* AudioENCODE */
mfxStatus MFX_CDECL MFXAudioENCODE_Query(mfxSession session, mfxAudioParam *in, mfxAudioParam *out); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_Query(mfxSession session, mfxAudioParam *in, mfxAudioParam *out);
mfxStatus MFX_CDECL MFXAudioENCODE_QueryIOSize(mfxSession session, mfxAudioParam *par, mfxAudioAllocRequest *request); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_QueryIOSize(mfxSession session, mfxAudioParam *par, mfxAudioAllocRequest *request);
mfxStatus MFX_CDECL MFXAudioENCODE_Init(mfxSession session, mfxAudioParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_Init(mfxSession session, mfxAudioParam *par);
mfxStatus MFX_CDECL MFXAudioENCODE_Reset(mfxSession session, mfxAudioParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_Reset(mfxSession session, mfxAudioParam *par);
mfxStatus MFX_CDECL MFXAudioENCODE_Close(mfxSession session); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_Close(mfxSession session);
mfxStatus MFX_CDECL MFXAudioENCODE_GetAudioParam(mfxSession session, mfxAudioParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_GetAudioParam(mfxSession session, mfxAudioParam *par);
mfxStatus MFX_CDECL MFXAudioENCODE_EncodeFrameAsync(mfxSession session, mfxAudioFrame *frame, mfxBitstream *bs, mfxSyncPoint *syncp); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioENCODE_EncodeFrameAsync(mfxSession session, mfxAudioFrame *frame, mfxBitstream *bs, mfxSyncPoint *syncp);
/* AudioDECODE */ /* AudioDECODE */
mfxStatus MFX_CDECL MFXAudioDECODE_Query(mfxSession session, mfxAudioParam *in, mfxAudioParam *out); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_Query(mfxSession session, mfxAudioParam *in, mfxAudioParam *out);
mfxStatus MFX_CDECL MFXAudioDECODE_DecodeHeader(mfxSession session, mfxBitstream *bs, mfxAudioParam* par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_DecodeHeader(mfxSession session, mfxBitstream *bs, mfxAudioParam* par);
mfxStatus MFX_CDECL MFXAudioDECODE_Init(mfxSession session, mfxAudioParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_Init(mfxSession session, mfxAudioParam *par);
mfxStatus MFX_CDECL MFXAudioDECODE_Reset(mfxSession session, mfxAudioParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_Reset(mfxSession session, mfxAudioParam *par);
mfxStatus MFX_CDECL MFXAudioDECODE_Close(mfxSession session); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_Close(mfxSession session);
mfxStatus MFX_CDECL MFXAudioDECODE_QueryIOSize(mfxSession session, mfxAudioParam *par, mfxAudioAllocRequest *request); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_QueryIOSize(mfxSession session, mfxAudioParam *par, mfxAudioAllocRequest *request);
mfxStatus MFX_CDECL MFXAudioDECODE_GetAudioParam(mfxSession session, mfxAudioParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_GetAudioParam(mfxSession session, mfxAudioParam *par);
mfxStatus MFX_CDECL MFXAudioDECODE_DecodeFrameAsync(mfxSession session, mfxBitstream *bs, mfxAudioFrame *frame, mfxSyncPoint *syncp); MFX_DEPRECATED mfxStatus MFX_CDECL MFXAudioDECODE_DecodeFrameAsync(mfxSession session, mfxBitstream *bs, mfxAudioFrame *frame, mfxSyncPoint *syncp);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif #endif

View File

@ -1,129 +1,129 @@
// Copyright (c) 2019-2020 Intel Corporation // Copyright (c) 2019-2020 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXBRC_H__ #ifndef __MFXBRC_H__
#define __MFXBRC_H__ #define __MFXBRC_H__
#include "mfxvstructures.h" #include "mfxvstructures.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* Extended Buffer Ids */ /* Extended Buffer Ids */
enum { enum {
MFX_EXTBUFF_BRC = MFX_MAKEFOURCC('E','B','R','C') MFX_EXTBUFF_BRC = MFX_MAKEFOURCC('E','B','R','C')
}; };
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
#if (MFX_VERSION >= 1026) #if (MFX_VERSION >= 1026)
mfxU32 reserved[23]; mfxU32 reserved[23];
mfxU16 SceneChange; // Frame is Scene Chg frame mfxU16 SceneChange; // Frame is Scene Chg frame
mfxU16 LongTerm; // Frame is long term refrence mfxU16 LongTerm; // Frame is long term refrence
mfxU32 FrameCmplx; // Frame Complexity mfxU32 FrameCmplx; // Frame Complexity
#else #else
mfxU32 reserved[25]; mfxU32 reserved[25];
#endif #endif
mfxU32 EncodedOrder; // Frame number in a sequence of reordered frames starting from encoder Init() 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 DisplayOrder; // Frame number in a sequence of frames in display order starting from last IDR
mfxU32 CodedFrameSize; // Size of frame in bytes after encoding mfxU32 CodedFrameSize; // Size of frame in bytes after encoding
mfxU16 FrameType; // See FrameType enumerator mfxU16 FrameType; // See FrameType enumerator
mfxU16 PyramidLayer; // B-pyramid or P-pyramid layer, frame belongs to mfxU16 PyramidLayer; // B-pyramid or P-pyramid layer, frame belongs to
mfxU16 NumRecode; // Number of recodings performed for this frame mfxU16 NumRecode; // Number of recodings performed for this frame
mfxU16 NumExtParam; mfxU16 NumExtParam;
mfxExtBuffer** ExtParam; mfxExtBuffer** ExtParam;
} mfxBRCFrameParam; } mfxBRCFrameParam;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxI32 QpY; // Frame-level Luma QP mfxI32 QpY; // Frame-level Luma QP
#if (MFX_VERSION >= 1029) #if (MFX_VERSION >= 1029)
mfxU32 InitialCpbRemovalDelay; mfxU32 InitialCpbRemovalDelay;
mfxU32 InitialCpbRemovalOffset; mfxU32 InitialCpbRemovalOffset;
mfxU32 reserved1[7]; mfxU32 reserved1[7];
mfxU32 MaxFrameSize; // Max frame size in bytes (used for rePak) mfxU32 MaxFrameSize; // Max frame size in bytes (used for rePak)
mfxU8 DeltaQP[8]; // deltaQP[i] is adding to QP value while i-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 MaxNumRepak; // Max number of rePak to provide MaxFrameSize (from 0 to 8)
mfxU16 NumExtParam; mfxU16 NumExtParam;
mfxExtBuffer** ExtParam; // extension buffer list mfxExtBuffer** ExtParam; // extension buffer list
#else #else
mfxU32 reserved1[13]; mfxU32 reserved1[13];
mfxHDL reserved2; mfxHDL reserved2;
#endif #endif
} mfxBRCFrameCtrl; } mfxBRCFrameCtrl;
MFX_PACK_END() MFX_PACK_END()
/* BRCStatus */ /* BRCStatus */
enum { enum {
MFX_BRC_OK = 0, // CodedFrameSize is acceptable, no further recoding/padding/skip required 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_BIG_FRAME = 1, // Coded frame is too big, recoding required
MFX_BRC_SMALL_FRAME = 2, // Coded frame is too small, 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_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_BRC_PANIC_SMALL_FRAME = 4 // Coded frame is too small, no further recoding possible - required padding to MinFrameSize
}; };
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxU32 MinFrameSize; // Size in bytes, coded frame must be padded to when Status = MFX_BRC_PANIC_SMALL_FRAME mfxU32 MinFrameSize; // Size in bytes, coded frame must be padded to when Status = MFX_BRC_PANIC_SMALL_FRAME
mfxU16 BRCStatus; // See BRCStatus enumerator mfxU16 BRCStatus; // See BRCStatus enumerator
mfxU16 reserved[25]; mfxU16 reserved[25];
mfxHDL reserved1; mfxHDL reserved1;
} mfxBRCFrameStatus; } mfxBRCFrameStatus;
MFX_PACK_END() MFX_PACK_END()
/* Structure contains set of callbacks to perform external bit-rate control. /* Structure contains set of callbacks to perform external bit-rate control.
Can be attached to mfxVideoParam structure during encoder initialization. Can be attached to mfxVideoParam structure during encoder initialization.
Turn mfxExtCodingOption2::ExtBRC option ON to make encoder use external BRC instead of native one. */ Turn mfxExtCodingOption2::ExtBRC option ON to make encoder use external BRC instead of native one. */
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 reserved[14]; mfxU32 reserved[14];
mfxHDL pthis; // Pointer to user-defined BRC instance. Will be passed to each mfxExtBRC callback. 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. // Initialize BRC. Will be invoked during encoder Init(). In - pthis, par.
mfxStatus (MFX_CDECL *Init) (mfxHDL pthis, mfxVideoParam* par); mfxStatus (MFX_CDECL *Init) (mfxHDL pthis, mfxVideoParam* par);
// Reset BRC. Will be invoked during encoder Reset(). In - pthis, par. // Reset BRC. Will be invoked during encoder Reset(). In - pthis, par.
mfxStatus (MFX_CDECL *Reset) (mfxHDL pthis, mfxVideoParam* par); mfxStatus (MFX_CDECL *Reset) (mfxHDL pthis, mfxVideoParam* par);
// Close BRC. Will be invoked during encoder Close(). In - pthis. // Close BRC. Will be invoked during encoder Close(). In - pthis.
mfxStatus (MFX_CDECL *Close) (mfxHDL pthis); mfxStatus (MFX_CDECL *Close) (mfxHDL pthis);
// Obtain from BRC controls required for frame encoding. // Obtain from BRC controls required for frame encoding.
// Will be invoked BEFORE encoding of each frame. In - pthis, par; Out - ctrl. // Will be invoked BEFORE encoding of each frame. In - pthis, par; Out - ctrl.
mfxStatus (MFX_CDECL *GetFrameCtrl) (mfxHDL pthis, mfxBRCFrameParam* par, mfxBRCFrameCtrl* 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. // 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. // 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); mfxStatus (MFX_CDECL *Update) (mfxHDL pthis, mfxBRCFrameParam* par, mfxBRCFrameCtrl* ctrl, mfxBRCFrameStatus* status);
mfxHDL reserved1[10]; mfxHDL reserved1[10];
} mfxExtBRC; } mfxExtBRC;
MFX_PACK_END() MFX_PACK_END()
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif

View File

@ -1,271 +1,271 @@
// Copyright (c) 2018-2019 Intel Corporation // Copyright (c) 2018-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXCAMERA_H__ #ifndef __MFXCAMERA_H__
#define __MFXCAMERA_H__ #define __MFXCAMERA_H__
#include "mfxcommon.h" #include "mfxcommon.h"
#if !defined (__GNUC__) #if !defined (__GNUC__)
#pragma warning(disable: 4201) #pragma warning(disable: 4201)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Camera Extended Buffer Ids */ /* Camera Extended Buffer Ids */
enum { enum {
MFX_EXTBUF_CAM_GAMMA_CORRECTION = MFX_MAKEFOURCC('C','G','A','M'), 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_WHITE_BALANCE = MFX_MAKEFOURCC('C','W','B','L'),
MFX_EXTBUF_CAM_HOT_PIXEL_REMOVAL = MFX_MAKEFOURCC('C','H','P','R'), 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_BLACK_LEVEL_CORRECTION = MFX_MAKEFOURCC('C','B','L','C'),
MFX_EXTBUF_CAM_VIGNETTE_CORRECTION = MFX_MAKEFOURCC('C','V','G','T'), 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_BAYER_DENOISE = MFX_MAKEFOURCC('C','D','N','S'),
MFX_EXTBUF_CAM_COLOR_CORRECTION_3X3 = MFX_MAKEFOURCC('C','C','3','3'), 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_PADDING = MFX_MAKEFOURCC('C','P','A','D'),
MFX_EXTBUF_CAM_PIPECONTROL = MFX_MAKEFOURCC('C','P','P','C'), 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_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_LENS_GEOM_DIST_CORRECTION = MFX_MAKEFOURCC('C','L','G','D'),
MFX_EXTBUF_CAM_3DLUT = MFX_MAKEFOURCC('C','L','U','T'), 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_TOTAL_COLOR_CONTROL = MFX_MAKEFOURCC('C','T','C','C'),
MFX_EXTBUF_CAM_CSC_YUV_RGB = MFX_MAKEFOURCC('C','C','Y','R') MFX_EXTBUF_CAM_CSC_YUV_RGB = MFX_MAKEFOURCC('C','C','Y','R')
}; };
typedef enum { typedef enum {
MFX_CAM_GAMMA_VALUE = 0x0001, MFX_CAM_GAMMA_VALUE = 0x0001,
MFX_CAM_GAMMA_LUT = 0x0002, MFX_CAM_GAMMA_LUT = 0x0002,
} mfxCamGammaParam; } mfxCamGammaParam;
MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_STRUCT_W_L_TYPE()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 Mode; mfxU16 Mode;
mfxU16 reserved1; mfxU16 reserved1;
mfxF64 GammaValue; mfxF64 GammaValue;
mfxU16 reserved2[3]; mfxU16 reserved2[3];
mfxU16 NumPoints; mfxU16 NumPoints;
mfxU16 GammaPoint[1024]; mfxU16 GammaPoint[1024];
mfxU16 GammaCorrected[1024]; mfxU16 GammaCorrected[1024];
mfxU32 reserved3[4]; mfxU32 reserved3[4];
} mfxExtCamGammaCorrection; } mfxExtCamGammaCorrection;
MFX_PACK_END() MFX_PACK_END()
typedef enum { typedef enum {
MFX_CAM_WHITE_BALANCE_MANUAL = 0x0001, MFX_CAM_WHITE_BALANCE_MANUAL = 0x0001,
MFX_CAM_WHITE_BALANCE_AUTO = 0x0002 MFX_CAM_WHITE_BALANCE_AUTO = 0x0002
} mfxCamWhiteBalanceMode; } mfxCamWhiteBalanceMode;
MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_STRUCT_W_L_TYPE()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 Mode; mfxU32 Mode;
mfxF64 R; mfxF64 R;
mfxF64 G0; mfxF64 G0;
mfxF64 B; mfxF64 B;
mfxF64 G1; mfxF64 G1;
mfxU32 reserved[8]; mfxU32 reserved[8];
} mfxExtCamWhiteBalance; } mfxExtCamWhiteBalance;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 R; mfxU16 R;
mfxU16 G; mfxU16 G;
mfxU16 B; mfxU16 B;
mfxU16 C; mfxU16 C;
mfxU16 M; mfxU16 M;
mfxU16 Y; mfxU16 Y;
mfxU16 reserved[6]; mfxU16 reserved[6];
} mfxExtCamTotalColorControl; } mfxExtCamTotalColorControl;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxF32 PreOffset[3]; mfxF32 PreOffset[3];
mfxF32 Matrix[3][3]; mfxF32 Matrix[3][3];
mfxF32 PostOffset[3]; mfxF32 PostOffset[3];
mfxU16 reserved[30]; mfxU16 reserved[30];
} mfxExtCamCscYuvRgb; } mfxExtCamCscYuvRgb;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 PixelThresholdDifference; mfxU16 PixelThresholdDifference;
mfxU16 PixelCountThreshold; mfxU16 PixelCountThreshold;
} mfxExtCamHotPixelRemoval; } mfxExtCamHotPixelRemoval;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 R; mfxU16 R;
mfxU16 G0; mfxU16 G0;
mfxU16 B; mfxU16 B;
mfxU16 G1; mfxU16 G1;
mfxU32 reserved[4]; mfxU32 reserved[4];
} mfxExtCamBlackLevelCorrection; } mfxExtCamBlackLevelCorrection;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxU8 integer; mfxU8 integer;
mfxU8 mantissa; mfxU8 mantissa;
} mfxCamVignetteCorrectionElement; } mfxCamVignetteCorrectionElement;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxCamVignetteCorrectionElement R; mfxCamVignetteCorrectionElement R;
mfxCamVignetteCorrectionElement G0; mfxCamVignetteCorrectionElement G0;
mfxCamVignetteCorrectionElement B; mfxCamVignetteCorrectionElement B;
mfxCamVignetteCorrectionElement G1; mfxCamVignetteCorrectionElement G1;
} mfxCamVignetteCorrectionParam; } mfxCamVignetteCorrectionParam;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 Width; mfxU32 Width;
mfxU32 Height; mfxU32 Height;
mfxU32 Pitch; mfxU32 Pitch;
mfxU32 reserved[7]; mfxU32 reserved[7];
mfxCamVignetteCorrectionParam *CorrectionMap; mfxCamVignetteCorrectionParam *CorrectionMap;
} mfxExtCamVignetteCorrection; } mfxExtCamVignetteCorrection;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 Threshold; mfxU16 Threshold;
mfxU16 reserved[27]; mfxU16 reserved[27];
} mfxExtCamBayerDenoise; } mfxExtCamBayerDenoise;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_STRUCT_W_L_TYPE()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxF64 CCM[3][3]; mfxF64 CCM[3][3];
mfxU32 reserved[4]; mfxU32 reserved[4];
} mfxExtCamColorCorrection3x3; } mfxExtCamColorCorrection3x3;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 Top; mfxU16 Top;
mfxU16 Bottom; mfxU16 Bottom;
mfxU16 Left; mfxU16 Left;
mfxU16 Right; mfxU16 Right;
mfxU32 reserved[4]; mfxU32 reserved[4];
} mfxExtCamPadding; } mfxExtCamPadding;
MFX_PACK_END() MFX_PACK_END()
typedef enum { typedef enum {
MFX_CAM_BAYER_BGGR = 0x0000, MFX_CAM_BAYER_BGGR = 0x0000,
MFX_CAM_BAYER_RGGB = 0x0001, MFX_CAM_BAYER_RGGB = 0x0001,
MFX_CAM_BAYER_GBRG = 0x0002, MFX_CAM_BAYER_GBRG = 0x0002,
MFX_CAM_BAYER_GRBG = 0x0003 MFX_CAM_BAYER_GRBG = 0x0003
} mfxCamBayerFormat; } mfxCamBayerFormat;
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 RawFormat; mfxU16 RawFormat;
mfxU16 reserved1; mfxU16 reserved1;
mfxU32 reserved[5]; mfxU32 reserved[5];
} mfxExtCamPipeControl; } mfxExtCamPipeControl;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct{ typedef struct{
mfxU16 Pixel; mfxU16 Pixel;
mfxU16 Red; mfxU16 Red;
mfxU16 Green; mfxU16 Green;
mfxU16 Blue; mfxU16 Blue;
} mfxCamFwdGammaSegment; } mfxCamFwdGammaSegment;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_STRUCT_W_L_TYPE()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 reserved[19]; mfxU16 reserved[19];
mfxU16 NumSegments; mfxU16 NumSegments;
union { union {
mfxCamFwdGammaSegment* Segment; mfxCamFwdGammaSegment* Segment;
mfxU64 reserved1; mfxU64 reserved1;
}; };
} mfxExtCamFwdGamma; } mfxExtCamFwdGamma;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxF32 a[3]; // [R, G, B] mfxF32 a[3]; // [R, G, B]
mfxF32 b[3]; // [R, G, B] mfxF32 b[3]; // [R, G, B]
mfxF32 c[3]; // [R, G, B] mfxF32 c[3]; // [R, G, B]
mfxF32 d[3]; // [R, G, B] mfxF32 d[3]; // [R, G, B]
mfxU16 reserved[36]; mfxU16 reserved[36];
} mfxExtCamLensGeomDistCorrection; } mfxExtCamLensGeomDistCorrection;
MFX_PACK_END() MFX_PACK_END()
/* LUTSize */ /* LUTSize */
enum { enum {
MFX_CAM_3DLUT17_SIZE = (17 * 17 * 17), MFX_CAM_3DLUT17_SIZE = (17 * 17 * 17),
MFX_CAM_3DLUT33_SIZE = (33 * 33 * 33), MFX_CAM_3DLUT33_SIZE = (33 * 33 * 33),
MFX_CAM_3DLUT65_SIZE = (65 * 65 * 65) MFX_CAM_3DLUT65_SIZE = (65 * 65 * 65)
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxU16 R; mfxU16 R;
mfxU16 G; mfxU16 G;
mfxU16 B; mfxU16 B;
mfxU16 Reserved; mfxU16 Reserved;
} mfxCam3DLutEntry; } mfxCam3DLutEntry;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_STRUCT_W_L_TYPE()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 reserved[10]; mfxU16 reserved[10];
mfxU32 Size; mfxU32 Size;
union union
{ {
mfxCam3DLutEntry* Table; mfxCam3DLutEntry* Table;
mfxU64 reserved1; mfxU64 reserved1;
}; };
} mfxExtCam3DLut; } mfxExtCam3DLut;
MFX_PACK_END() MFX_PACK_END()
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif // __MFXCAMERA_H__ #endif // __MFXCAMERA_H__

View File

@ -1,212 +1,214 @@
// Copyright (c) 2018-2020 Intel Corporation // Copyright (c) 2018-2020 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXCOMMON_H__ #ifndef __MFXCOMMON_H__
#define __MFXCOMMON_H__ #define __MFXCOMMON_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#if !defined (__GNUC__) #if !defined (__GNUC__)
#pragma warning(disable: 4201) #pragma warning(disable: 4201)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
#define MFX_MAKEFOURCC(A,B,C,D) ((((int)A))+(((int)B)<<8)+(((int)C)<<16)+(((int)D)<<24)) #define MFX_MAKEFOURCC(A,B,C,D) ((((int)A))+(((int)B)<<8)+(((int)C)<<16)+(((int)D)<<24))
/* Extended Configuration Header Structure */ /* Extended Configuration Header Structure */
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxU32 BufferId; mfxU32 BufferId;
mfxU32 BufferSz; mfxU32 BufferSz;
} mfxExtBuffer; } mfxExtBuffer;
MFX_PACK_END() MFX_PACK_END()
/* Library initialization and deinitialization */ /* Library initialization and deinitialization */
typedef mfxI32 mfxIMPL; typedef mfxI32 mfxIMPL;
#define MFX_IMPL_BASETYPE(x) (0x00ff & (x)) #define MFX_IMPL_BASETYPE(x) (0x00ff & (x))
enum { enum {
MFX_IMPL_AUTO = 0x0000, /* Auto Selection/In or Not Supported/Out */ MFX_IMPL_AUTO = 0x0000, /* Auto Selection/In or Not Supported/Out */
MFX_IMPL_SOFTWARE = 0x0001, /* Pure Software Implementation */ MFX_IMPL_SOFTWARE = 0x0001, /* Pure Software Implementation */
MFX_IMPL_HARDWARE = 0x0002, /* Hardware Accelerated Implementation (default device) */ MFX_IMPL_HARDWARE = 0x0002, /* Hardware Accelerated Implementation (default device) */
MFX_IMPL_AUTO_ANY = 0x0003, /* Auto selection of any hardware/software implementation */ 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_HARDWARE_ANY = 0x0004, /* Auto selection of any hardware implementation */
MFX_IMPL_HARDWARE2 = 0x0005, /* Hardware accelerated implementation (2nd device) */ MFX_IMPL_HARDWARE2 = 0x0005, /* Hardware accelerated implementation (2nd device) */
MFX_IMPL_HARDWARE3 = 0x0006, /* Hardware accelerated implementation (3rd device) */ MFX_IMPL_HARDWARE3 = 0x0006, /* Hardware accelerated implementation (3rd device) */
MFX_IMPL_HARDWARE4 = 0x0007, /* Hardware accelerated implementation (4th device) */ MFX_IMPL_HARDWARE4 = 0x0007, /* Hardware accelerated implementation (4th device) */
MFX_IMPL_RUNTIME = 0x0008, MFX_IMPL_RUNTIME = 0x0008,
#if (MFX_VERSION >= MFX_VERSION_NEXT) #if (MFX_VERSION >= MFX_VERSION_NEXT)
MFX_IMPL_SINGLE_THREAD= 0x0009, MFX_IMPL_SINGLE_THREAD= 0x0009,
#endif #endif
MFX_IMPL_VIA_ANY = 0x0100, MFX_IMPL_VIA_ANY = 0x0100,
MFX_IMPL_VIA_D3D9 = 0x0200, MFX_IMPL_VIA_D3D9 = 0x0200,
MFX_IMPL_VIA_D3D11 = 0x0300, MFX_IMPL_VIA_D3D11 = 0x0300,
MFX_IMPL_VIA_VAAPI = 0x0400, MFX_IMPL_VIA_VAAPI = 0x0400,
MFX_IMPL_AUDIO = 0x8000, MFX_IMPL_AUDIO = 0x8000,
#if (MFX_VERSION >= MFX_VERSION_NEXT) #if (MFX_VERSION >= MFX_VERSION_NEXT)
MFX_IMPL_EXTERNAL_THREADING = 0x10000, MFX_IMPL_EXTERNAL_THREADING = 0x10000,
#endif #endif
MFX_IMPL_UNSUPPORTED = 0x0000 /* One of the MFXQueryIMPL returns */ MFX_IMPL_UNSUPPORTED = 0x0000 /* One of the MFXQueryIMPL returns */
}; };
/* Version Info */ /* Version Info */
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef union { typedef union {
struct { struct {
mfxU16 Minor; mfxU16 Minor;
mfxU16 Major; mfxU16 Major;
}; };
mfxU32 Version; mfxU32 Version;
} mfxVersion; } mfxVersion;
MFX_PACK_END() MFX_PACK_END()
/* session priority */ /* session priority */
typedef enum typedef enum
{ {
MFX_PRIORITY_LOW = 0, MFX_PRIORITY_LOW = 0,
MFX_PRIORITY_NORMAL = 1, MFX_PRIORITY_NORMAL = 1,
MFX_PRIORITY_HIGH = 2 MFX_PRIORITY_HIGH = 2
} mfxPriority; } mfxPriority;
typedef struct _mfxEncryptedData mfxEncryptedData; typedef struct _mfxEncryptedData mfxEncryptedData;
MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_STRUCT_W_L_TYPE()
typedef struct { typedef struct {
union { union {
struct { struct {
mfxEncryptedData* EncryptedData; mfxEncryptedData* EncryptedData;
mfxExtBuffer **ExtParam; mfxExtBuffer **ExtParam;
mfxU16 NumExtParam; mfxU16 NumExtParam;
}; };
mfxU32 reserved[6]; mfxU32 reserved[6];
}; };
mfxI64 DecodeTimeStamp; mfxI64 DecodeTimeStamp;
mfxU64 TimeStamp; mfxU64 TimeStamp;
mfxU8* Data; mfxU8* Data;
mfxU32 DataOffset; mfxU32 DataOffset;
mfxU32 DataLength; mfxU32 DataLength;
mfxU32 MaxLength; mfxU32 MaxLength;
mfxU16 PicStruct; mfxU16 PicStruct;
mfxU16 FrameType; mfxU16 FrameType;
mfxU16 DataFlag; mfxU16 DataFlag;
mfxU16 reserved2; mfxU16 reserved2;
} mfxBitstream; } mfxBitstream;
MFX_PACK_END() MFX_PACK_END()
typedef struct _mfxSyncPoint *mfxSyncPoint; typedef struct _mfxSyncPoint *mfxSyncPoint;
/* GPUCopy */ /* GPUCopy */
enum { enum {
MFX_GPUCOPY_DEFAULT = 0, MFX_GPUCOPY_DEFAULT = 0,
MFX_GPUCOPY_ON = 1, MFX_GPUCOPY_ON = 1,
MFX_GPUCOPY_OFF = 2 MFX_GPUCOPY_OFF = 2
}; };
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxIMPL Implementation; mfxIMPL Implementation;
mfxVersion Version; mfxVersion Version;
mfxU16 ExternalThreads; mfxU16 ExternalThreads;
union { union {
struct { struct {
mfxExtBuffer **ExtParam; mfxExtBuffer **ExtParam;
mfxU16 NumExtParam; mfxU16 NumExtParam;
}; };
mfxU16 reserved2[5]; mfxU16 reserved2[5];
}; };
mfxU16 GPUCopy; mfxU16 GPUCopy;
mfxU16 reserved[21]; mfxU16 reserved[21];
} mfxInitParam; } mfxInitParam;
MFX_PACK_END() MFX_PACK_END()
enum { enum {
MFX_EXTBUFF_THREADS_PARAM = MFX_MAKEFOURCC('T','H','D','P') MFX_EXTBUFF_THREADS_PARAM = MFX_MAKEFOURCC('T','H','D','P')
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 NumThread; mfxU16 NumThread;
mfxI32 SchedulingType; mfxI32 SchedulingType;
mfxI32 Priority; mfxI32 Priority;
mfxU16 reserved[55]; mfxU16 reserved[55];
} mfxExtThreadsParam; } mfxExtThreadsParam;
MFX_PACK_END() MFX_PACK_END()
/* PlatformCodeName */ /* PlatformCodeName */
enum { enum {
MFX_PLATFORM_UNKNOWN = 0, MFX_PLATFORM_UNKNOWN = 0,
MFX_PLATFORM_SANDYBRIDGE = 1, MFX_PLATFORM_SANDYBRIDGE = 1,
MFX_PLATFORM_IVYBRIDGE = 2, MFX_PLATFORM_IVYBRIDGE = 2,
MFX_PLATFORM_HASWELL = 3, MFX_PLATFORM_HASWELL = 3,
MFX_PLATFORM_BAYTRAIL = 4, MFX_PLATFORM_BAYTRAIL = 4,
MFX_PLATFORM_BROADWELL = 5, MFX_PLATFORM_BROADWELL = 5,
MFX_PLATFORM_CHERRYTRAIL = 6, MFX_PLATFORM_CHERRYTRAIL = 6,
MFX_PLATFORM_SKYLAKE = 7, MFX_PLATFORM_SKYLAKE = 7,
MFX_PLATFORM_APOLLOLAKE = 8, MFX_PLATFORM_APOLLOLAKE = 8,
MFX_PLATFORM_KABYLAKE = 9, MFX_PLATFORM_KABYLAKE = 9,
#if (MFX_VERSION >= 1025) #if (MFX_VERSION >= 1025)
MFX_PLATFORM_GEMINILAKE = 10, MFX_PLATFORM_GEMINILAKE = 10,
MFX_PLATFORM_COFFEELAKE = 11, MFX_PLATFORM_COFFEELAKE = 11,
MFX_PLATFORM_CANNONLAKE = 20, MFX_PLATFORM_CANNONLAKE = 20,
#endif #endif
#if (MFX_VERSION >= 1027) #if (MFX_VERSION >= 1027)
MFX_PLATFORM_ICELAKE = 30, MFX_PLATFORM_ICELAKE = 30,
#endif #endif
MFX_PLATFORM_JASPERLAKE = 32, MFX_PLATFORM_JASPERLAKE = 32,
MFX_PLATFORM_ELKHARTLAKE = 33, MFX_PLATFORM_ELKHARTLAKE = 33,
MFX_PLATFORM_TIGERLAKE = 40, MFX_PLATFORM_TIGERLAKE = 40,
MFX_PLATFORM_KEEMBAY = 50, MFX_PLATFORM_ROCKETLAKE = 42,
}; MFX_PLATFORM_ALDERLAKE_S = 43,
MFX_PLATFORM_KEEMBAY = 50,
#if (MFX_VERSION >= 1031) };
typedef enum
{ #if (MFX_VERSION >= 1031)
MFX_MEDIA_UNKNOWN = 0xffff, typedef enum
MFX_MEDIA_INTEGRATED = 0, {
MFX_MEDIA_DISCRETE = 1 MFX_MEDIA_UNKNOWN = 0xffff,
} mfxMediaAdapterType; MFX_MEDIA_INTEGRATED = 0,
#endif MFX_MEDIA_DISCRETE = 1
} mfxMediaAdapterType;
MFX_PACK_BEGIN_USUAL_STRUCT() #endif
typedef struct {
mfxU16 CodeName; MFX_PACK_BEGIN_USUAL_STRUCT()
mfxU16 DeviceId; typedef struct {
#if (MFX_VERSION >= 1031) mfxU16 CodeName;
mfxU16 MediaAdapterType; mfxU16 DeviceId;
mfxU16 reserved[13]; #if (MFX_VERSION >= 1031)
#else mfxU16 MediaAdapterType;
mfxU16 reserved[14]; mfxU16 reserved[13];
#endif #else
} mfxPlatform; mfxU16 reserved[14];
MFX_PACK_END() #endif
} mfxPlatform;
#ifdef __cplusplus MFX_PACK_END()
}
#endif /* __cplusplus */ #ifdef __cplusplus
}
#endif #endif /* __cplusplus */
#endif

View File

@ -1,212 +1,258 @@
// Copyright (c) 2019-2020 Intel Corporation // Copyright (c) 2019-2020 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXDEFS_H__ #ifndef __MFXDEFS_H__
#define __MFXDEFS_H__ #define __MFXDEFS_H__
#define MFX_VERSION_MAJOR 1 #define MFX_VERSION_MAJOR 1
#define MFX_VERSION_MINOR 34 #define MFX_VERSION_MINOR 35
// MFX_VERSION_NEXT is always +1 from last public release // MFX_VERSION_NEXT is always +1 from last public release
// may be enforced by MFX_VERSION_USE_LATEST define // may be enforced by MFX_VERSION_USE_LATEST define
// if MFX_VERSION_USE_LATEST is defined MFX_VERSION is ignored // if MFX_VERSION_USE_LATEST is defined MFX_VERSION is ignored
#define MFX_VERSION_NEXT (MFX_VERSION_MAJOR * 1000 + MFX_VERSION_MINOR + 1) #define MFX_VERSION_NEXT (MFX_VERSION_MAJOR * 1000 + MFX_VERSION_MINOR + 1)
// MFX_VERSION - version of API that 'assumed' by build may be provided externally // 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 it omitted then latest stable API derived from Major.Minor is assumed
#if !defined(MFX_VERSION) #if !defined(MFX_VERSION)
#if defined(MFX_VERSION_USE_LATEST) #if defined(MFX_VERSION_USE_LATEST)
#define MFX_VERSION MFX_VERSION_NEXT #define MFX_VERSION MFX_VERSION_NEXT
#else #else
#define MFX_VERSION (MFX_VERSION_MAJOR * 1000 + MFX_VERSION_MINOR) #define MFX_VERSION (MFX_VERSION_MAJOR * 1000 + MFX_VERSION_MINOR)
#endif #endif
#else #else
#undef MFX_VERSION_MINOR #undef MFX_VERSION_MINOR
#define MFX_VERSION_MINOR ((MFX_VERSION) % 1000) #define MFX_VERSION_MINOR ((MFX_VERSION) % 1000)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* In preprocessor syntax # symbol has stringize meaning, /* In preprocessor syntax # symbol has stringize meaning,
so to expand some macro to preprocessor pragma we need to use so to expand some macro to preprocessor pragma we need to use
special compiler dependent construction */ special compiler dependent construction */
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define MFX_PRAGMA_IMPL(x) __pragma(x) #define MFX_PRAGMA_IMPL(x) __pragma(x)
#else #else
#define MFX_PRAGMA_IMPL(x) _Pragma(#x) #define MFX_PRAGMA_IMPL(x) _Pragma(#x)
#endif #endif
#define MFX_PACK_BEGIN_X(x) MFX_PRAGMA_IMPL(pack(push, x)) #define MFX_PACK_BEGIN_X(x) MFX_PRAGMA_IMPL(pack(push, x))
#define MFX_PACK_END() MFX_PRAGMA_IMPL(pack(pop)) #define MFX_PACK_END() MFX_PRAGMA_IMPL(pack(pop))
/* The general rule for alignment is following: /* The general rule for alignment is following:
- structures with pointers have 4/8 bytes alignment on 32/64 bit systems - structures with pointers have 4/8 bytes alignment on 32/64 bit systems
- structures with fields of type mfxU64/mfxF64 (unsigned long long / double) - 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 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 - all the rest structures are 4 bytes aligned
- there are several exceptions: some structs which had 4-byte alignment were extended - 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 with pointer / long type fields; such structs have 4-byte alignment to keep binary
compatibility with previously release API */ compatibility with previously release API */
#define MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_X(4) #define MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_X(4)
/* 64-bit LP64 data model */ /* 64-bit LP64 data model */
#if defined(_WIN64) || defined(__LP64__) #if defined(_WIN64) || defined(__LP64__)
#define MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_X(8) #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) #define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(8)
/* 32-bit ILP32 data model Windows (Intel architecture) */ /* 32-bit ILP32 data model Windows (Intel architecture) */
#elif defined(_WIN32) || defined(_M_IX86) && !defined(__linux__) #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_PTR() MFX_PACK_BEGIN_X(4)
#define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(8) #define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(8)
/* 32-bit ILP32 data model Linux */ /* 32-bit ILP32 data model Linux */
#elif defined(__ILP32__) #elif defined(__ILP32__)
#define MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_X(4) #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) #define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(4)
#else #else
#error Unknown packing #error Unknown packing
#endif #endif
#define __INT64 long long #define __INT64 long long
#define __UINT64 unsigned long long #define __UINT64 unsigned long long
#ifdef _WIN32 #ifdef _WIN32
#define MFX_CDECL __cdecl #define MFX_CDECL __cdecl
#define MFX_STDCALL __stdcall #define MFX_STDCALL __stdcall
#else #else
#define MFX_CDECL #define MFX_CDECL
#define MFX_STDCALL #define MFX_STDCALL
#endif /* _WIN32 */ #endif /* _WIN32 */
#define MFX_INFINITE 0xFFFFFFFF #define MFX_INFINITE 0xFFFFFFFF
typedef unsigned char mfxU8; #if !defined(MFX_DEPRECATED_OFF) && (MFX_VERSION >= 1034)
typedef char mfxI8; #define MFX_DEPRECATED_OFF
typedef short mfxI16; #endif
typedef unsigned short mfxU16;
typedef unsigned int mfxU32; #ifndef MFX_DEPRECATED_OFF
typedef int mfxI32; #if defined(__cplusplus) && __cplusplus >= 201402L
#if defined( _WIN32 ) || defined ( _WIN64 ) #define MFX_DEPRECATED [[deprecated]]
typedef unsigned long mfxUL32; #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg [[deprecated]]
typedef long mfxL32; #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
#else #elif defined(__clang__)
typedef unsigned int mfxUL32; #define MFX_DEPRECATED __attribute__((deprecated))
typedef int mfxL32; #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
#endif #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
typedef float mfxF32; #elif defined(__INTEL_COMPILER)
typedef double mfxF64; #if (defined(_WIN32) || defined(_WIN64))
typedef __UINT64 mfxU64; #define MFX_DEPRECATED __declspec(deprecated)
typedef __INT64 mfxI64; #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
typedef void* mfxHDL; #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
typedef mfxHDL mfxMemId; #elif defined(__linux__)
typedef void* mfxThreadTask; #define MFX_DEPRECATED __attribute__((deprecated))
typedef char mfxChar; #if defined(__cplusplus)
#define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
typedef struct { #else
mfxI16 x; #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
mfxI16 y; #endif
} mfxI16Pair; #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
#endif
typedef struct { #elif defined(_MSC_VER) && _MSC_VER > 1200 // VS 6 doesn't support deprecation
mfxHDL first; #define MFX_DEPRECATED __declspec(deprecated)
mfxHDL second; #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
} mfxHDLPair; #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))
Error message #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
\*********************************************************************************/ #else
typedef enum #define MFX_DEPRECATED
{ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
/* no error */ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
MFX_ERR_NONE = 0, /* no error */ #endif
#else
/* reserved for unexpected errors */ #define MFX_DEPRECATED
MFX_ERR_UNKNOWN = -1, /* unknown error. */ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
#define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
/* error codes <0 */ #endif
MFX_ERR_NULL_PTR = -2, /* null pointer */
MFX_ERR_UNSUPPORTED = -3, /* undeveloped feature */ typedef unsigned char mfxU8;
MFX_ERR_MEMORY_ALLOC = -4, /* failed to allocate memory */ typedef char mfxI8;
MFX_ERR_NOT_ENOUGH_BUFFER = -5, /* insufficient buffer at input/output */ typedef short mfxI16;
MFX_ERR_INVALID_HANDLE = -6, /* invalid handle */ typedef unsigned short mfxU16;
MFX_ERR_LOCK_MEMORY = -7, /* failed to lock the memory block */ typedef unsigned int mfxU32;
MFX_ERR_NOT_INITIALIZED = -8, /* member function called before initialization */ typedef int mfxI32;
MFX_ERR_NOT_FOUND = -9, /* the specified object is not found */ #if defined( _WIN32 ) || defined ( _WIN64 )
MFX_ERR_MORE_DATA = -10, /* expect more data at input */ typedef unsigned long mfxUL32;
MFX_ERR_MORE_SURFACE = -11, /* expect more surface at output */ typedef long mfxL32;
MFX_ERR_ABORTED = -12, /* operation aborted */ #else
MFX_ERR_DEVICE_LOST = -13, /* lose the HW acceleration device */ typedef unsigned int mfxUL32;
MFX_ERR_INCOMPATIBLE_VIDEO_PARAM = -14, /* incompatible video parameters */ typedef int mfxL32;
MFX_ERR_INVALID_VIDEO_PARAM = -15, /* invalid video parameters */ #endif
MFX_ERR_UNDEFINED_BEHAVIOR = -16, /* undefined behavior */ typedef float mfxF32;
MFX_ERR_DEVICE_FAILED = -17, /* device operation failure */ typedef double mfxF64;
MFX_ERR_MORE_BITSTREAM = -18, /* expect more bitstream buffers at output */ typedef __UINT64 mfxU64;
MFX_ERR_INCOMPATIBLE_AUDIO_PARAM = -19, /* incompatible audio parameters */ typedef __INT64 mfxI64;
MFX_ERR_INVALID_AUDIO_PARAM = -20, /* invalid audio parameters */ typedef void* mfxHDL;
MFX_ERR_GPU_HANG = -21, /* device operation failure caused by GPU hang */ typedef mfxHDL mfxMemId;
MFX_ERR_REALLOC_SURFACE = -22, /* bigger output surface required */ typedef void* mfxThreadTask;
typedef char mfxChar;
/* warnings >0 */
MFX_WRN_IN_EXECUTION = 1, /* the previous asynchronous operation is in execution */ typedef struct {
MFX_WRN_DEVICE_BUSY = 2, /* the HW acceleration device is busy */ mfxI16 x;
MFX_WRN_VIDEO_PARAM_CHANGED = 3, /* the video parameters are changed during decoding */ mfxI16 y;
MFX_WRN_PARTIAL_ACCELERATION = 4, /* SW is used */ } mfxI16Pair;
MFX_WRN_INCOMPATIBLE_VIDEO_PARAM = 5, /* incompatible video parameters */
MFX_WRN_VALUE_NOT_CHANGED = 6, /* the value is saturated based on its valid range */ typedef struct {
MFX_WRN_OUT_OF_RANGE = 7, /* the value is out of valid range */ mfxHDL first;
MFX_WRN_FILTER_SKIPPED = 10, /* one of requested filters has been skipped */ mfxHDL second;
MFX_WRN_INCOMPATIBLE_AUDIO_PARAM = 11, /* incompatible audio parameters */ } mfxHDLPair;
#if MFX_VERSION >= 1031
/* low-delay partial output */ /*********************************************************************************\
MFX_ERR_NONE_PARTIAL_OUTPUT = 12, /* frame is not ready, but bitstream contains partial output */ Error message
#endif \*********************************************************************************/
typedef enum
/* threading statuses */ {
MFX_TASK_DONE = MFX_ERR_NONE, /* task has been completed */ /* no error */
MFX_TASK_WORKING = 8, /* there is some more work to do */ MFX_ERR_NONE = 0, /* no error */
MFX_TASK_BUSY = 9, /* task is waiting for resources */
/* reserved for unexpected errors */
/* plug-in statuses */ MFX_ERR_UNKNOWN = -1, /* unknown error. */
MFX_ERR_MORE_DATA_SUBMIT_TASK = -10000, /* return MFX_ERR_MORE_DATA but submit internal asynchronous task */
/* error codes <0 */
} mfxStatus; MFX_ERR_NULL_PTR = -2, /* null pointer */
MFX_ERR_UNSUPPORTED = -3, /* undeveloped feature */
MFX_ERR_MEMORY_ALLOC = -4, /* failed to allocate memory */
// Application MFX_ERR_NOT_ENOUGH_BUFFER = -5, /* insufficient buffer at input/output */
#if defined(MFX_DISPATCHER_EXPOSED_PREFIX) MFX_ERR_INVALID_HANDLE = -6, /* invalid handle */
MFX_ERR_LOCK_MEMORY = -7, /* failed to lock the memory block */
#include "mfxdispatcherprefixedfunctions.h" MFX_ERR_NOT_INITIALIZED = -8, /* member function called before initialization */
MFX_ERR_NOT_FOUND = -9, /* the specified object is not found */
#endif // MFX_DISPATCHER_EXPOSED_PREFIX 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 */
#ifdef __cplusplus MFX_ERR_DEVICE_LOST = -13, /* lose the HW acceleration device */
} MFX_ERR_INCOMPATIBLE_VIDEO_PARAM = -14, /* incompatible video parameters */
#endif /* __cplusplus */ MFX_ERR_INVALID_VIDEO_PARAM = -15, /* invalid video parameters */
MFX_ERR_UNDEFINED_BEHAVIOR = -16, /* undefined behavior */
#endif /* __MFXDEFS_H__ */ 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__ */

View File

@ -1,145 +1,145 @@
// Copyright (c) 2017 Intel Corporation // Copyright (c) 2017 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXDISPATCHERPREFIXEDFUNCTIONS_H__ #ifndef __MFXDISPATCHERPREFIXEDFUNCTIONS_H__
#define __MFXDISPATCHERPREFIXEDFUNCTIONS_H__ #define __MFXDISPATCHERPREFIXEDFUNCTIONS_H__
// API 1.0 functions // API 1.0 functions
#define MFXInit disp_MFXInit #define MFXInit disp_MFXInit
#define MFXClose disp_MFXClose #define MFXClose disp_MFXClose
#define MFXQueryIMPL disp_MFXQueryIMPL #define MFXQueryIMPL disp_MFXQueryIMPL
#define MFXQueryVersion disp_MFXQueryVersion #define MFXQueryVersion disp_MFXQueryVersion
#define MFXJoinSession disp_MFXJoinSession #define MFXJoinSession disp_MFXJoinSession
#define MFXDisjoinSession disp_MFXDisjoinSession #define MFXDisjoinSession disp_MFXDisjoinSession
#define MFXCloneSession disp_MFXCloneSession #define MFXCloneSession disp_MFXCloneSession
#define MFXSetPriority disp_MFXSetPriority #define MFXSetPriority disp_MFXSetPriority
#define MFXGetPriority disp_MFXGetPriority #define MFXGetPriority disp_MFXGetPriority
#define MFXVideoCORE_SetBufferAllocator disp_MFXVideoCORE_SetBufferAllocator #define MFXVideoCORE_SetBufferAllocator disp_MFXVideoCORE_SetBufferAllocator
#define MFXVideoCORE_SetFrameAllocator disp_MFXVideoCORE_SetFrameAllocator #define MFXVideoCORE_SetFrameAllocator disp_MFXVideoCORE_SetFrameAllocator
#define MFXVideoCORE_SetHandle disp_MFXVideoCORE_SetHandle #define MFXVideoCORE_SetHandle disp_MFXVideoCORE_SetHandle
#define MFXVideoCORE_GetHandle disp_MFXVideoCORE_GetHandle #define MFXVideoCORE_GetHandle disp_MFXVideoCORE_GetHandle
#define MFXVideoCORE_SyncOperation disp_MFXVideoCORE_SyncOperation #define MFXVideoCORE_SyncOperation disp_MFXVideoCORE_SyncOperation
#define MFXVideoENCODE_Query disp_MFXVideoENCODE_Query #define MFXVideoENCODE_Query disp_MFXVideoENCODE_Query
#define MFXVideoENCODE_QueryIOSurf disp_MFXVideoENCODE_QueryIOSurf #define MFXVideoENCODE_QueryIOSurf disp_MFXVideoENCODE_QueryIOSurf
#define MFXVideoENCODE_Init disp_MFXVideoENCODE_Init #define MFXVideoENCODE_Init disp_MFXVideoENCODE_Init
#define MFXVideoENCODE_Reset disp_MFXVideoENCODE_Reset #define MFXVideoENCODE_Reset disp_MFXVideoENCODE_Reset
#define MFXVideoENCODE_Close disp_MFXVideoENCODE_Close #define MFXVideoENCODE_Close disp_MFXVideoENCODE_Close
#define MFXVideoENCODE_GetVideoParam disp_MFXVideoENCODE_GetVideoParam #define MFXVideoENCODE_GetVideoParam disp_MFXVideoENCODE_GetVideoParam
#define MFXVideoENCODE_GetEncodeStat disp_MFXVideoENCODE_GetEncodeStat #define MFXVideoENCODE_GetEncodeStat disp_MFXVideoENCODE_GetEncodeStat
#define MFXVideoENCODE_EncodeFrameAsync disp_MFXVideoENCODE_EncodeFrameAsync #define MFXVideoENCODE_EncodeFrameAsync disp_MFXVideoENCODE_EncodeFrameAsync
#define MFXVideoDECODE_Query disp_MFXVideoDECODE_Query #define MFXVideoDECODE_Query disp_MFXVideoDECODE_Query
#define MFXVideoDECODE_DecodeHeader disp_MFXVideoDECODE_DecodeHeader #define MFXVideoDECODE_DecodeHeader disp_MFXVideoDECODE_DecodeHeader
#define MFXVideoDECODE_QueryIOSurf disp_MFXVideoDECODE_QueryIOSurf #define MFXVideoDECODE_QueryIOSurf disp_MFXVideoDECODE_QueryIOSurf
#define MFXVideoDECODE_Init disp_MFXVideoDECODE_Init #define MFXVideoDECODE_Init disp_MFXVideoDECODE_Init
#define MFXVideoDECODE_Reset disp_MFXVideoDECODE_Reset #define MFXVideoDECODE_Reset disp_MFXVideoDECODE_Reset
#define MFXVideoDECODE_Close disp_MFXVideoDECODE_Close #define MFXVideoDECODE_Close disp_MFXVideoDECODE_Close
#define MFXVideoDECODE_GetVideoParam disp_MFXVideoDECODE_GetVideoParam #define MFXVideoDECODE_GetVideoParam disp_MFXVideoDECODE_GetVideoParam
#define MFXVideoDECODE_GetDecodeStat disp_MFXVideoDECODE_GetDecodeStat #define MFXVideoDECODE_GetDecodeStat disp_MFXVideoDECODE_GetDecodeStat
#define MFXVideoDECODE_SetSkipMode disp_MFXVideoDECODE_SetSkipMode #define MFXVideoDECODE_SetSkipMode disp_MFXVideoDECODE_SetSkipMode
#define MFXVideoDECODE_GetPayload disp_MFXVideoDECODE_GetPayload #define MFXVideoDECODE_GetPayload disp_MFXVideoDECODE_GetPayload
#define MFXVideoDECODE_DecodeFrameAsync disp_MFXVideoDECODE_DecodeFrameAsync #define MFXVideoDECODE_DecodeFrameAsync disp_MFXVideoDECODE_DecodeFrameAsync
#define MFXVideoVPP_Query disp_MFXVideoVPP_Query #define MFXVideoVPP_Query disp_MFXVideoVPP_Query
#define MFXVideoVPP_QueryIOSurf disp_MFXVideoVPP_QueryIOSurf #define MFXVideoVPP_QueryIOSurf disp_MFXVideoVPP_QueryIOSurf
#define MFXVideoVPP_Init disp_MFXVideoVPP_Init #define MFXVideoVPP_Init disp_MFXVideoVPP_Init
#define MFXVideoVPP_Reset disp_MFXVideoVPP_Reset #define MFXVideoVPP_Reset disp_MFXVideoVPP_Reset
#define MFXVideoVPP_Close disp_MFXVideoVPP_Close #define MFXVideoVPP_Close disp_MFXVideoVPP_Close
#define MFXVideoVPP_GetVideoParam disp_MFXVideoVPP_GetVideoParam #define MFXVideoVPP_GetVideoParam disp_MFXVideoVPP_GetVideoParam
#define MFXVideoVPP_GetVPPStat disp_MFXVideoVPP_GetVPPStat #define MFXVideoVPP_GetVPPStat disp_MFXVideoVPP_GetVPPStat
#define MFXVideoVPP_RunFrameVPPAsync disp_MFXVideoVPP_RunFrameVPPAsync #define MFXVideoVPP_RunFrameVPPAsync disp_MFXVideoVPP_RunFrameVPPAsync
// API 1.1 functions // API 1.1 functions
#define MFXVideoUSER_Register disp_MFXVideoUSER_Register #define MFXVideoUSER_Register disp_MFXVideoUSER_Register
#define MFXVideoUSER_Unregister disp_MFXVideoUSER_Unregister #define MFXVideoUSER_Unregister disp_MFXVideoUSER_Unregister
#define MFXVideoUSER_ProcessFrameAsync disp_MFXVideoUSER_ProcessFrameAsync #define MFXVideoUSER_ProcessFrameAsync disp_MFXVideoUSER_ProcessFrameAsync
// API 1.10 functions // API 1.10 functions
#define MFXVideoENC_Query disp_MFXVideoENC_Query #define MFXVideoENC_Query disp_MFXVideoENC_Query
#define MFXVideoENC_QueryIOSurf disp_MFXVideoENC_QueryIOSurf #define MFXVideoENC_QueryIOSurf disp_MFXVideoENC_QueryIOSurf
#define MFXVideoENC_Init disp_MFXVideoENC_Init #define MFXVideoENC_Init disp_MFXVideoENC_Init
#define MFXVideoENC_Reset disp_MFXVideoENC_Reset #define MFXVideoENC_Reset disp_MFXVideoENC_Reset
#define MFXVideoENC_Close disp_MFXVideoENC_Close #define MFXVideoENC_Close disp_MFXVideoENC_Close
#define MFXVideoENC_ProcessFrameAsync disp_MFXVideoENC_ProcessFrameAsync #define MFXVideoENC_ProcessFrameAsync disp_MFXVideoENC_ProcessFrameAsync
#define MFXVideoVPP_RunFrameVPPAsyncEx disp_MFXVideoVPP_RunFrameVPPAsyncEx #define MFXVideoVPP_RunFrameVPPAsyncEx disp_MFXVideoVPP_RunFrameVPPAsyncEx
#define MFXVideoUSER_Load disp_MFXVideoUSER_Load #define MFXVideoUSER_Load disp_MFXVideoUSER_Load
#define MFXVideoUSER_UnLoad disp_MFXVideoUSER_UnLoad #define MFXVideoUSER_UnLoad disp_MFXVideoUSER_UnLoad
// API 1.11 functions // API 1.11 functions
#define MFXVideoPAK_Query disp_MFXVideoPAK_Query #define MFXVideoPAK_Query disp_MFXVideoPAK_Query
#define MFXVideoPAK_QueryIOSurf disp_MFXVideoPAK_QueryIOSurf #define MFXVideoPAK_QueryIOSurf disp_MFXVideoPAK_QueryIOSurf
#define MFXVideoPAK_Init disp_MFXVideoPAK_Init #define MFXVideoPAK_Init disp_MFXVideoPAK_Init
#define MFXVideoPAK_Reset disp_MFXVideoPAK_Reset #define MFXVideoPAK_Reset disp_MFXVideoPAK_Reset
#define MFXVideoPAK_Close disp_MFXVideoPAK_Close #define MFXVideoPAK_Close disp_MFXVideoPAK_Close
#define MFXVideoPAK_ProcessFrameAsync disp_MFXVideoPAK_ProcessFrameAsync #define MFXVideoPAK_ProcessFrameAsync disp_MFXVideoPAK_ProcessFrameAsync
// API 1.13 functions // API 1.13 functions
#define MFXVideoUSER_LoadByPath disp_MFXVideoUSER_LoadByPath #define MFXVideoUSER_LoadByPath disp_MFXVideoUSER_LoadByPath
// API 1.14 functions // API 1.14 functions
#define MFXInitEx disp_MFXInitEx #define MFXInitEx disp_MFXInitEx
#define MFXDoWork disp_MFXDoWork #define MFXDoWork disp_MFXDoWork
// Audio library functions // Audio library functions
// API 1.8 functions // API 1.8 functions
#define MFXAudioCORE_SyncOperation disp_MFXAudioCORE_SyncOperation #define MFXAudioCORE_SyncOperation disp_MFXAudioCORE_SyncOperation
#define MFXAudioENCODE_Query disp_MFXAudioENCODE_Query #define MFXAudioENCODE_Query disp_MFXAudioENCODE_Query
#define MFXAudioENCODE_QueryIOSize disp_MFXAudioENCODE_QueryIOSize #define MFXAudioENCODE_QueryIOSize disp_MFXAudioENCODE_QueryIOSize
#define MFXAudioENCODE_Init disp_MFXAudioENCODE_Init #define MFXAudioENCODE_Init disp_MFXAudioENCODE_Init
#define MFXAudioENCODE_Reset disp_MFXAudioENCODE_Reset #define MFXAudioENCODE_Reset disp_MFXAudioENCODE_Reset
#define MFXAudioENCODE_Close disp_MFXAudioENCODE_Close #define MFXAudioENCODE_Close disp_MFXAudioENCODE_Close
#define MFXAudioENCODE_GetAudioParam disp_MFXAudioENCODE_GetAudioParam #define MFXAudioENCODE_GetAudioParam disp_MFXAudioENCODE_GetAudioParam
#define MFXAudioENCODE_EncodeFrameAsync disp_MFXAudioENCODE_EncodeFrameAsync #define MFXAudioENCODE_EncodeFrameAsync disp_MFXAudioENCODE_EncodeFrameAsync
#define MFXAudioDECODE_Query disp_MFXAudioDECODE_Query #define MFXAudioDECODE_Query disp_MFXAudioDECODE_Query
#define MFXAudioDECODE_DecodeHeader disp_MFXAudioDECODE_DecodeHeader #define MFXAudioDECODE_DecodeHeader disp_MFXAudioDECODE_DecodeHeader
#define MFXAudioDECODE_Init disp_MFXAudioDECODE_Init #define MFXAudioDECODE_Init disp_MFXAudioDECODE_Init
#define MFXAudioDECODE_Reset disp_MFXAudioDECODE_Reset #define MFXAudioDECODE_Reset disp_MFXAudioDECODE_Reset
#define MFXAudioDECODE_Close disp_MFXAudioDECODE_Close #define MFXAudioDECODE_Close disp_MFXAudioDECODE_Close
#define MFXAudioDECODE_QueryIOSize disp_MFXAudioDECODE_QueryIOSize #define MFXAudioDECODE_QueryIOSize disp_MFXAudioDECODE_QueryIOSize
#define MFXAudioDECODE_GetAudioParam disp_MFXAudioDECODE_GetAudioParam #define MFXAudioDECODE_GetAudioParam disp_MFXAudioDECODE_GetAudioParam
#define MFXAudioDECODE_DecodeFrameAsync disp_MFXAudioDECODE_DecodeFrameAsync #define MFXAudioDECODE_DecodeFrameAsync disp_MFXAudioDECODE_DecodeFrameAsync
// API 1.9 functions // API 1.9 functions
#define MFXAudioUSER_Register disp_MFXAudioUSER_Register #define MFXAudioUSER_Register disp_MFXAudioUSER_Register
#define MFXAudioUSER_Unregister disp_MFXAudioUSER_Unregister #define MFXAudioUSER_Unregister disp_MFXAudioUSER_Unregister
#define MFXAudioUSER_ProcessFrameAsync disp_MFXAudioUSER_ProcessFrameAsync #define MFXAudioUSER_ProcessFrameAsync disp_MFXAudioUSER_ProcessFrameAsync
#define MFXAudioUSER_Load disp_MFXAudioUSER_Load #define MFXAudioUSER_Load disp_MFXAudioUSER_Load
#define MFXAudioUSER_UnLoad disp_MFXAudioUSER_UnLoad #define MFXAudioUSER_UnLoad disp_MFXAudioUSER_UnLoad
// API 1.19 functions // API 1.19 functions
#define MFXVideoENC_GetVideoParam disp_MFXVideoENC_GetVideoParam #define MFXVideoENC_GetVideoParam disp_MFXVideoENC_GetVideoParam
#define MFXVideoPAK_GetVideoParam disp_MFXVideoPAK_GetVideoParam #define MFXVideoPAK_GetVideoParam disp_MFXVideoPAK_GetVideoParam
#define MFXVideoCORE_QueryPlatform disp_MFXVideoCORE_QueryPlatform #define MFXVideoCORE_QueryPlatform disp_MFXVideoCORE_QueryPlatform
#define MFXVideoUSER_GetPlugin disp_MFXVideoUSER_GetPlugin #define MFXVideoUSER_GetPlugin disp_MFXVideoUSER_GetPlugin
#endif #endif

View File

@ -1,74 +1,74 @@
// Copyright (c) 2017-2019 Intel Corporation // Copyright (c) 2017-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXENC_H__ #ifndef __MFXENC_H__
#define __MFXENC_H__ #define __MFXENC_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#include "mfxvstructures.h" #include "mfxvstructures.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct _mfxENCInput{ MFX_DEPRECATED typedef struct _mfxENCInput{
mfxU32 reserved[32]; mfxU32 reserved[32];
mfxFrameSurface1 *InSurface; mfxFrameSurface1 *InSurface;
mfxU16 NumFrameL0; mfxU16 NumFrameL0;
mfxFrameSurface1 **L0Surface; mfxFrameSurface1 **L0Surface;
mfxU16 NumFrameL1; mfxU16 NumFrameL1;
mfxFrameSurface1 **L1Surface; mfxFrameSurface1 **L1Surface;
mfxU16 NumExtParam; mfxU16 NumExtParam;
mfxExtBuffer **ExtParam; mfxExtBuffer **ExtParam;
} mfxENCInput; } mfxENCInput;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct _mfxENCOutput{ MFX_DEPRECATED typedef struct _mfxENCOutput{
mfxU32 reserved[32]; mfxU32 reserved[32];
mfxFrameSurface1 *OutSurface; mfxFrameSurface1 *OutSurface;
mfxU16 NumExtParam; mfxU16 NumExtParam;
mfxExtBuffer **ExtParam; mfxExtBuffer **ExtParam;
} mfxENCOutput; } mfxENCOutput;
MFX_PACK_END() MFX_PACK_END()
mfxStatus MFX_CDECL MFXVideoENC_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out);
mfxStatus MFX_CDECL MFXVideoENC_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest *request); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest *request);
mfxStatus MFX_CDECL MFXVideoENC_Init(mfxSession session, mfxVideoParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_Init(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoENC_Reset(mfxSession session, mfxVideoParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_Reset(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoENC_Close(mfxSession session); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_Close(mfxSession session);
mfxStatus MFX_CDECL MFXVideoENC_ProcessFrameAsync(mfxSession session, mfxENCInput *in, mfxENCOutput *out, mfxSyncPoint *syncp); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_ProcessFrameAsync(mfxSession session, mfxENCInput *in, mfxENCOutput *out, mfxSyncPoint *syncp);
mfxStatus MFX_CDECL MFXVideoENC_GetVideoParam(mfxSession session, mfxVideoParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoENC_GetVideoParam(mfxSession session, mfxVideoParam *par);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -1,290 +1,303 @@
// Copyright (c) 2018-2019 Intel Corporation // Copyright (c) 2018-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXFEIHEVC_H__ #ifndef __MFXFEIHEVC_H__
#define __MFXFEIHEVC_H__ #define __MFXFEIHEVC_H__
#include "mfxcommon.h" #include "mfxcommon.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#if (MFX_VERSION >= 1027) #if (MFX_VERSION >= 1027)
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 SearchPath; mfxU16 SearchPath;
mfxU16 LenSP; mfxU16 LenSP;
mfxU16 RefWidth; mfxU16 RefWidth;
mfxU16 RefHeight; mfxU16 RefHeight;
mfxU16 SearchWindow; mfxU16 SearchWindow;
mfxU16 NumMvPredictors[2]; /* 0 for L0 and 1 for L1 */ mfxU16 NumMvPredictors[2]; /* 0 for L0 and 1 for L1 */
mfxU16 MultiPred[2]; /* 0 for L0 and 1 for L1 */ mfxU16 MultiPred[2]; /* 0 for L0 and 1 for L1 */
mfxU16 SubPelMode; mfxU16 SubPelMode;
mfxU16 AdaptiveSearch; mfxU16 AdaptiveSearch;
mfxU16 MVPredictor; mfxU16 MVPredictor;
mfxU16 PerCuQp; mfxU16 PerCuQp;
mfxU16 PerCtuInput; mfxU16 PerCtuInput;
mfxU16 ForceCtuSplit; mfxU16 ForceCtuSplit;
mfxU16 NumFramePartitions; mfxU16 NumFramePartitions;
mfxU16 FastIntraMode; mfxU16 FastIntraMode;
mfxU16 reserved0[107]; mfxU16 reserved0[107];
} mfxExtFeiHevcEncFrameCtrl; } mfxExtFeiHevcEncFrameCtrl;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { MFX_DEPRECATED typedef struct {
struct { struct {
mfxU8 RefL0 : 4; mfxU8 RefL0 : 4;
mfxU8 RefL1 : 4; mfxU8 RefL1 : 4;
} RefIdx[4]; /* index is predictor number */ } RefIdx[4]; /* index is predictor number */
mfxU32 BlockSize : 2; mfxU32 BlockSize : 2;
mfxU32 reserved0 : 30; mfxU32 reserved0 : 30;
mfxI16Pair MV[4][2]; /* first index is predictor number, second is 0 for L0 and 1 for L1 */ mfxI16Pair MV[4][2]; /* first index is predictor number, second is 0 for L0 and 1 for L1 */
} mfxFeiHevcEncMVPredictors; } mfxFeiHevcEncMVPredictors;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 VaBufferID; mfxU32 VaBufferID;
mfxU32 Pitch; mfxU32 Pitch;
mfxU32 Height; mfxU32 Height;
mfxU16 reserved0[54]; mfxU16 reserved0[54];
mfxFeiHevcEncMVPredictors *Data; mfxFeiHevcEncMVPredictors *Data;
} mfxExtFeiHevcEncMVPredictors; } mfxExtFeiHevcEncMVPredictors;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 VaBufferID; mfxU32 VaBufferID;
mfxU32 Pitch; mfxU32 Pitch;
mfxU32 Height; mfxU32 Height;
mfxU16 reserved[6]; mfxU16 reserved[6];
mfxU8 *Data; mfxU8 *Data;
} mfxExtFeiHevcEncQP; } mfxExtFeiHevcEncQP;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { MFX_DEPRECATED typedef struct {
mfxU32 ForceToIntra : 1; mfxU32 ForceToIntra : 1;
mfxU32 ForceToInter : 1; mfxU32 ForceToInter : 1;
mfxU32 reserved0 : 30; mfxU32 reserved0 : 30;
mfxU32 reserved1[3]; mfxU32 reserved1[3];
} mfxFeiHevcEncCtuCtrl; } mfxFeiHevcEncCtuCtrl;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 VaBufferID; mfxU32 VaBufferID;
mfxU32 Pitch; mfxU32 Pitch;
mfxU32 Height; mfxU32 Height;
mfxU16 reserved0[54]; mfxU16 reserved0[54];
mfxFeiHevcEncCtuCtrl *Data; mfxFeiHevcEncCtuCtrl *Data;
} mfxExtFeiHevcEncCtuCtrl; } mfxExtFeiHevcEncCtuCtrl;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 MaxFrameSize; /* in bytes */ mfxU32 MaxFrameSize; /* in bytes */
mfxU32 NumPasses; /* up to 8 */ mfxU32 NumPasses; /* up to 8 */
mfxU16 reserved[8]; mfxU16 reserved[8];
mfxU8 DeltaQP[8]; /* list of delta QPs, only positive values */ mfxU8 DeltaQP[8]; /* list of delta QPs, only positive values */
} mfxExtFeiHevcRepackCtrl; } mfxExtFeiHevcRepackCtrl;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 NumPasses; mfxU32 NumPasses;
mfxU16 reserved[58]; mfxU16 reserved[58];
} mfxExtFeiHevcRepackStat; } mfxExtFeiHevcRepackStat;
MFX_PACK_END() MFX_PACK_END()
#if MFX_VERSION >= MFX_VERSION_NEXT #if MFX_VERSION >= MFX_VERSION_NEXT
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { MFX_DEPRECATED typedef struct {
/* DWORD 0 */ /* DWORD 0 */
mfxU32 reserved0; mfxU32 reserved0;
/* DWORD 1 */ /* DWORD 1 */
mfxU32 SplitLevel2Part0 : 4; mfxU32 SplitLevel2Part0 : 4;
mfxU32 SplitLevel2Part1 : 4; mfxU32 SplitLevel2Part1 : 4;
mfxU32 SplitLevel2Part2 : 4; mfxU32 SplitLevel2Part2 : 4;
mfxU32 SplitLevel2Part3 : 4; mfxU32 SplitLevel2Part3 : 4;
mfxU32 SplitLevel1 : 4; mfxU32 SplitLevel1 : 4;
mfxU32 SplitLevel0 : 1; mfxU32 SplitLevel0 : 1;
mfxU32 reserved10 : 3; mfxU32 reserved10 : 3;
mfxU32 CuCountMinus1 : 6; mfxU32 CuCountMinus1 : 6;
mfxU32 LastCtuOfTileFlag : 1; mfxU32 LastCtuOfTileFlag : 1;
mfxU32 LastCtuOfSliceFlag : 1; mfxU32 LastCtuOfSliceFlag : 1;
/* DWORD 2 */ /* DWORD 2 */
mfxU32 CtuAddrX : 16; mfxU32 CtuAddrX : 16;
mfxU32 CtuAddrY : 16; mfxU32 CtuAddrY : 16;
/* DWORD 3 */ /* DWORD 3 */
mfxU32 reserved3; mfxU32 reserved3;
} mfxFeiHevcPakCtuRecordV0; } mfxFeiHevcPakCtuRecordV0;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 VaBufferID; mfxU32 VaBufferID;
mfxU32 Pitch; mfxU32 Pitch;
mfxU32 Height; mfxU32 Height;
mfxU16 reserved0[54]; mfxU16 reserved0[54];
mfxFeiHevcPakCtuRecordV0 *Data; mfxFeiHevcPakCtuRecordV0 *Data;
} mfxExtFeiHevcPakCtuRecordV0; } mfxExtFeiHevcPakCtuRecordV0;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { MFX_DEPRECATED typedef struct {
/* DWORD 0 */ /* DWORD 0 */
mfxU32 CuSize : 2; mfxU32 CuSize : 2;
mfxU32 PredMode : 1; mfxU32 PredMode : 1;
mfxU32 TransquantBypass : 1; mfxU32 TransquantBypass : 1;
mfxU32 PartMode : 3; mfxU32 PartMode : 3;
mfxU32 IpcmEnable : 1; mfxU32 IpcmEnable : 1;
mfxU32 IntraChromaMode : 3; mfxU32 IntraChromaMode : 3;
mfxU32 ZeroOutCoeffs : 1; mfxU32 ZeroOutCoeffs : 1;
mfxU32 reserved00 : 4; mfxU32 reserved00 : 4;
mfxU32 Qp : 7; mfxU32 Qp : 7;
mfxU32 QpSign : 1; mfxU32 QpSign : 1;
mfxU32 InterpredIdc : 8; mfxU32 InterpredIdc : 8;
/* DWORD 1 */ /* DWORD 1 */
mfxU32 IntraMode0 : 6; mfxU32 IntraMode0 : 6;
mfxU32 reserved10 : 2; mfxU32 reserved10 : 2;
mfxU32 IntraMode1 : 6; mfxU32 IntraMode1 : 6;
mfxU32 reserved11 : 2; mfxU32 reserved11 : 2;
mfxU32 IntraMode2 : 6; mfxU32 IntraMode2 : 6;
mfxU32 reserved12 : 2; mfxU32 reserved12 : 2;
mfxU32 IntraMode3 : 6; mfxU32 IntraMode3 : 6;
mfxU32 reserved13 : 2; mfxU32 reserved13 : 2;
/* DWORD 2-9 */ /* DWORD 2-9 */
struct { struct {
mfxI16 x[4]; mfxI16 x[4];
mfxI16 y[4]; mfxI16 y[4];
} MVs[2]; /* 0-L0, 1-L1 */ } MVs[2]; /* 0-L0, 1-L1 */
/* DWORD 10 */ /* DWORD 10 */
struct{ struct{
mfxU16 Ref0 : 4; mfxU16 Ref0 : 4;
mfxU16 Ref1 : 4; mfxU16 Ref1 : 4;
mfxU16 Ref2 : 4; mfxU16 Ref2 : 4;
mfxU16 Ref3 : 4; mfxU16 Ref3 : 4;
} RefIdx[2]; /* 0-L0, 1-L1 */ } RefIdx[2]; /* 0-L0, 1-L1 */
/* DWORD 11 */ /* DWORD 11 */
mfxU32 TuSize; mfxU32 TuSize;
/* DWORD 12 */ /* DWORD 12 */
mfxU32 TransformSkipY : 16; mfxU32 TransformSkipY : 16;
mfxU32 reserved120 : 12; mfxU32 reserved120 : 12;
mfxU32 TuCountM1 : 4; mfxU32 TuCountM1 : 4;
/* DWORD 13 */ /* DWORD 13 */
mfxU32 TransformSkipU : 16; mfxU32 TransformSkipU : 16;
mfxU32 TransformSkipV : 16; mfxU32 TransformSkipV : 16;
} mfxFeiHevcPakCuRecordV0; } mfxFeiHevcPakCuRecordV0;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 VaBufferID; mfxU32 VaBufferID;
mfxU32 Pitch; mfxU32 Pitch;
mfxU32 Height; mfxU32 Height;
mfxU16 reserved0[54]; mfxU16 reserved0[54];
mfxFeiHevcPakCuRecordV0 *Data; mfxFeiHevcPakCuRecordV0 *Data;
} mfxExtFeiHevcPakCuRecordV0; } mfxExtFeiHevcPakCuRecordV0;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { MFX_DEPRECATED typedef struct {
mfxU32 BestDistortion; mfxU32 BestDistortion;
mfxU32 ColocatedCtuDistortion; mfxU32 ColocatedCtuDistortion;
} mfxFeiHevcDistortionCtu; } mfxFeiHevcDistortionCtu;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { MFX_DEPRECATED typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 VaBufferID; mfxU32 VaBufferID;
mfxU32 Pitch; mfxU32 Pitch;
mfxU32 Height; mfxU32 Height;
mfxU16 reserved[6]; mfxU16 reserved[6];
mfxFeiHevcDistortionCtu *Data; mfxFeiHevcDistortionCtu *Data;
} mfxExtFeiHevcDistortion; } mfxExtFeiHevcDistortion;
MFX_PACK_END() MFX_PACK_END()
#endif #endif
enum { enum {
MFX_EXTBUFF_HEVCFEI_ENC_CTRL = MFX_MAKEFOURCC('F','H','C','T'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_CTRL) = MFX_MAKEFOURCC('F','H','C','T'),
MFX_EXTBUFF_HEVCFEI_ENC_MV_PRED = MFX_MAKEFOURCC('F','H','P','D'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_MV_PRED) = MFX_MAKEFOURCC('F','H','P','D'),
MFX_EXTBUFF_HEVCFEI_ENC_QP = MFX_MAKEFOURCC('F','H','Q','P'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_QP) = MFX_MAKEFOURCC('F','H','Q','P'),
MFX_EXTBUFF_HEVCFEI_ENC_CTU_CTRL = MFX_MAKEFOURCC('F','H','E','C'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_CTU_CTRL) = MFX_MAKEFOURCC('F','H','E','C'),
MFX_EXTBUFF_HEVCFEI_REPACK_CTRL = MFX_MAKEFOURCC('F','H','R','P'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_REPACK_CTRL) = MFX_MAKEFOURCC('F','H','R','P'),
MFX_EXTBUFF_HEVCFEI_REPACK_STAT = MFX_MAKEFOURCC('F','H','R','S'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_REPACK_STAT) = MFX_MAKEFOURCC('F','H','R','S'),
#if MFX_VERSION >= MFX_VERSION_NEXT #if MFX_VERSION >= MFX_VERSION_NEXT
MFX_EXTBUFF_HEVCFEI_PAK_CTU_REC = MFX_MAKEFOURCC('F','H','T','B'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_PAK_CTU_REC) = MFX_MAKEFOURCC('F','H','T','B'),
MFX_EXTBUFF_HEVCFEI_PAK_CU_REC = MFX_MAKEFOURCC('F','H','C','U'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_PAK_CU_REC) = MFX_MAKEFOURCC('F','H','C','U'),
MFX_EXTBUFF_HEVCFEI_ENC_DIST = MFX_MAKEFOURCC('F','H','D','S') MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_HEVCFEI_ENC_DIST) = MFX_MAKEFOURCC('F','H','D','S')
#endif #endif
}; };
#endif // MFX_VERSION MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_CTRL);
MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_MV_PRED);
#ifdef __cplusplus MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_QP);
} /* extern "C" */ MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_ENC_CTU_CTRL);
#endif /* __cplusplus */ MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_REPACK_CTRL);
MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_HEVCFEI_REPACK_STAT);
#endif // __MFXFEIHEVC_H__ #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__

View File

@ -1,105 +1,105 @@
// Copyright (c) 2017-2019 Intel Corporation // Copyright (c) 2017-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFX_JPEG_H__ #ifndef __MFX_JPEG_H__
#define __MFX_JPEG_H__ #define __MFX_JPEG_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* CodecId */ /* CodecId */
enum { enum {
MFX_CODEC_JPEG = MFX_MAKEFOURCC('J','P','E','G') MFX_CODEC_JPEG = MFX_MAKEFOURCC('J','P','E','G')
}; };
/* CodecProfile, CodecLevel */ /* CodecProfile, CodecLevel */
enum enum
{ {
MFX_PROFILE_JPEG_BASELINE = 1 MFX_PROFILE_JPEG_BASELINE = 1
}; };
enum enum
{ {
MFX_ROTATION_0 = 0, MFX_ROTATION_0 = 0,
MFX_ROTATION_90 = 1, MFX_ROTATION_90 = 1,
MFX_ROTATION_180 = 2, MFX_ROTATION_180 = 2,
MFX_ROTATION_270 = 3 MFX_ROTATION_270 = 3
}; };
enum { enum {
MFX_EXTBUFF_JPEG_QT = MFX_MAKEFOURCC('J','P','G','Q'), MFX_EXTBUFF_JPEG_QT = MFX_MAKEFOURCC('J','P','G','Q'),
MFX_EXTBUFF_JPEG_HUFFMAN = MFX_MAKEFOURCC('J','P','G','H') MFX_EXTBUFF_JPEG_HUFFMAN = MFX_MAKEFOURCC('J','P','G','H')
}; };
enum { enum {
MFX_JPEG_COLORFORMAT_UNKNOWN = 0, MFX_JPEG_COLORFORMAT_UNKNOWN = 0,
MFX_JPEG_COLORFORMAT_YCbCr = 1, MFX_JPEG_COLORFORMAT_YCbCr = 1,
MFX_JPEG_COLORFORMAT_RGB = 2 MFX_JPEG_COLORFORMAT_RGB = 2
}; };
enum { enum {
MFX_SCANTYPE_UNKNOWN = 0, MFX_SCANTYPE_UNKNOWN = 0,
MFX_SCANTYPE_INTERLEAVED = 1, MFX_SCANTYPE_INTERLEAVED = 1,
MFX_SCANTYPE_NONINTERLEAVED = 2 MFX_SCANTYPE_NONINTERLEAVED = 2
}; };
enum { enum {
MFX_CHROMAFORMAT_JPEG_SAMPLING = 6 MFX_CHROMAFORMAT_JPEG_SAMPLING = 6
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 reserved[7]; mfxU16 reserved[7];
mfxU16 NumTable; mfxU16 NumTable;
mfxU16 Qm[4][64]; mfxU16 Qm[4][64];
} mfxExtJPEGQuantTables; } mfxExtJPEGQuantTables;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 reserved[2]; mfxU16 reserved[2];
mfxU16 NumDCTable; mfxU16 NumDCTable;
mfxU16 NumACTable; mfxU16 NumACTable;
struct { struct {
mfxU8 Bits[16]; mfxU8 Bits[16];
mfxU8 Values[12]; mfxU8 Values[12];
} DCTables[4]; } DCTables[4];
struct { struct {
mfxU8 Bits[16]; mfxU8 Bits[16];
mfxU8 Values[162]; mfxU8 Values[162];
} ACTables[4]; } ACTables[4];
} mfxExtJPEGHuffmanTables; } mfxExtJPEGHuffmanTables;
MFX_PACK_END() MFX_PACK_END()
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif // __MFX_JPEG_H__ #endif // __MFX_JPEG_H__

View File

@ -1,99 +1,102 @@
// Copyright (c) 2017-2019 Intel Corporation // Copyright (c) 2017-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXLA_H__ #ifndef __MFXLA_H__
#define __MFXLA_H__ #define __MFXLA_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#include "mfxvstructures.h" #include "mfxvstructures.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
enum enum
{ {
MFX_EXTBUFF_LOOKAHEAD_CTRL = MFX_MAKEFOURCC('L','A','C','T'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_LOOKAHEAD_CTRL) = MFX_MAKEFOURCC('L','A','C','T'),
MFX_EXTBUFF_LOOKAHEAD_STAT = MFX_MAKEFOURCC('L','A','S','T'), MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_EXTBUFF_LOOKAHEAD_STAT) = MFX_MAKEFOURCC('L','A','S','T'),
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_LOOKAHEAD_CTRL);
typedef struct MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_EXTBUFF_LOOKAHEAD_STAT);
{
mfxExtBuffer Header; MFX_PACK_BEGIN_USUAL_STRUCT()
mfxU16 LookAheadDepth; MFX_DEPRECATED typedef struct
mfxU16 DependencyDepth; {
mfxU16 DownScaleFactor; mfxExtBuffer Header;
mfxU16 BPyramid; mfxU16 LookAheadDepth;
mfxU16 DependencyDepth;
mfxU16 reserved1[23]; mfxU16 DownScaleFactor;
mfxU16 BPyramid;
mfxU16 NumOutStream;
struct mfxStream{ mfxU16 reserved1[23];
mfxU16 Width;
mfxU16 Height; mfxU16 NumOutStream;
mfxU16 reserved2[14]; struct mfxStream{
} OutStream[16]; mfxU16 Width;
}mfxExtLAControl; mfxU16 Height;
MFX_PACK_END() mfxU16 reserved2[14];
} OutStream[16];
MFX_PACK_BEGIN_STRUCT_W_L_TYPE() }mfxExtLAControl;
typedef struct MFX_PACK_END()
{
mfxU16 Width; MFX_PACK_BEGIN_STRUCT_W_L_TYPE()
mfxU16 Height; MFX_DEPRECATED typedef struct
{
mfxU32 FrameType; mfxU16 Width;
mfxU32 FrameDisplayOrder; mfxU16 Height;
mfxU32 FrameEncodeOrder;
mfxU32 FrameType;
mfxU32 IntraCost; mfxU32 FrameDisplayOrder;
mfxU32 InterCost; mfxU32 FrameEncodeOrder;
mfxU32 DependencyCost; //aggregated cost, how this frame influences subsequent frames
mfxU16 Layer; mfxU32 IntraCost;
mfxU16 reserved[23]; mfxU32 InterCost;
mfxU32 DependencyCost; //aggregated cost, how this frame influences subsequent frames
mfxU64 EstimatedRate[52]; mfxU16 Layer;
}mfxLAFrameInfo; mfxU16 reserved[23];
MFX_PACK_END()
mfxU64 EstimatedRate[52];
MFX_PACK_BEGIN_STRUCT_W_PTR() }mfxLAFrameInfo;
typedef struct { MFX_PACK_END()
mfxExtBuffer Header;
MFX_PACK_BEGIN_STRUCT_W_PTR()
mfxU16 reserved[20]; MFX_DEPRECATED typedef struct {
mfxExtBuffer Header;
mfxU16 NumAlloc; //number of allocated mfxLAFrameInfo structures
mfxU16 NumStream; //number of resolutions mfxU16 reserved[20];
mfxU16 NumFrame; //number of frames for each resolution
mfxLAFrameInfo *FrameStat; //frame statistics mfxU16 NumAlloc; //number of allocated mfxLAFrameInfo structures
mfxU16 NumStream; //number of resolutions
mfxFrameSurface1 *OutSurface; //reordered surface mfxU16 NumFrame; //number of frames for each resolution
mfxLAFrameInfo *FrameStat; //frame statistics
} mfxExtLAFrameStatistics;
MFX_PACK_END() mfxFrameSurface1 *OutSurface; //reordered surface
#ifdef __cplusplus } mfxExtLAFrameStatistics;
} // extern "C" MFX_PACK_END()
#endif /* __cplusplus */
#ifdef __cplusplus
} // extern "C"
#endif #endif /* __cplusplus */
#endif

View File

@ -1,106 +1,106 @@
// Copyright (c) 2017-2019 Intel Corporation // Copyright (c) 2017-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXMVC_H__ #ifndef __MFXMVC_H__
#define __MFXMVC_H__ #define __MFXMVC_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* CodecProfile, CodecLevel */ /* CodecProfile, CodecLevel */
enum { enum {
/* MVC profiles */ /* MVC profiles */
MFX_PROFILE_AVC_MULTIVIEW_HIGH =118, MFX_PROFILE_AVC_MULTIVIEW_HIGH =118,
MFX_PROFILE_AVC_STEREO_HIGH =128 MFX_PROFILE_AVC_STEREO_HIGH =128
}; };
/* Extended Buffer Ids */ /* Extended Buffer Ids */
enum { enum {
MFX_EXTBUFF_MVC_SEQ_DESC = MFX_MAKEFOURCC('M','V','C','D'), MFX_EXTBUFF_MVC_SEQ_DESC = MFX_MAKEFOURCC('M','V','C','D'),
MFX_EXTBUFF_MVC_TARGET_VIEWS = MFX_MAKEFOURCC('M','V','C','T') MFX_EXTBUFF_MVC_TARGET_VIEWS = MFX_MAKEFOURCC('M','V','C','T')
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxU16 ViewId; mfxU16 ViewId;
mfxU16 NumAnchorRefsL0; mfxU16 NumAnchorRefsL0;
mfxU16 NumAnchorRefsL1; mfxU16 NumAnchorRefsL1;
mfxU16 AnchorRefL0[16]; mfxU16 AnchorRefL0[16];
mfxU16 AnchorRefL1[16]; mfxU16 AnchorRefL1[16];
mfxU16 NumNonAnchorRefsL0; mfxU16 NumNonAnchorRefsL0;
mfxU16 NumNonAnchorRefsL1; mfxU16 NumNonAnchorRefsL1;
mfxU16 NonAnchorRefL0[16]; mfxU16 NonAnchorRefL0[16];
mfxU16 NonAnchorRefL1[16]; mfxU16 NonAnchorRefL1[16];
} mfxMVCViewDependency; } mfxMVCViewDependency;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxU16 TemporalId; mfxU16 TemporalId;
mfxU16 LevelIdc; mfxU16 LevelIdc;
mfxU16 NumViews; mfxU16 NumViews;
mfxU16 NumTargetViews; mfxU16 NumTargetViews;
mfxU16 *TargetViewId; mfxU16 *TargetViewId;
} mfxMVCOperationPoint; } mfxMVCOperationPoint;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 NumView; mfxU32 NumView;
mfxU32 NumViewAlloc; mfxU32 NumViewAlloc;
mfxMVCViewDependency *View; mfxMVCViewDependency *View;
mfxU32 NumViewId; mfxU32 NumViewId;
mfxU32 NumViewIdAlloc; mfxU32 NumViewIdAlloc;
mfxU16 *ViewId; mfxU16 *ViewId;
mfxU32 NumOP; mfxU32 NumOP;
mfxU32 NumOPAlloc; mfxU32 NumOPAlloc;
mfxMVCOperationPoint *OP; mfxMVCOperationPoint *OP;
mfxU16 NumRefsTotal; mfxU16 NumRefsTotal;
mfxU32 Reserved[16]; mfxU32 Reserved[16];
} mfxExtMVCSeqDesc; } mfxExtMVCSeqDesc;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 TemporalId; mfxU16 TemporalId;
mfxU32 NumView; mfxU32 NumView;
mfxU16 ViewId[1024]; mfxU16 ViewId[1024];
} mfxExtMVCTargetViews ; } mfxExtMVCTargetViews ;
MFX_PACK_END() MFX_PACK_END()
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif #endif

View File

@ -1,78 +1,78 @@
// Copyright (c) 2017-2019 Intel Corporation // Copyright (c) 2017-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXPAK_H__ #ifndef __MFXPAK_H__
#define __MFXPAK_H__ #define __MFXPAK_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#include "mfxvstructures.h" #include "mfxvstructures.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { MFX_DEPRECATED typedef struct {
mfxU16 reserved[32]; mfxU16 reserved[32];
mfxFrameSurface1 *InSurface; mfxFrameSurface1 *InSurface;
mfxU16 NumFrameL0; mfxU16 NumFrameL0;
mfxFrameSurface1 **L0Surface; mfxFrameSurface1 **L0Surface;
mfxU16 NumFrameL1; mfxU16 NumFrameL1;
mfxFrameSurface1 **L1Surface; mfxFrameSurface1 **L1Surface;
mfxU16 NumExtParam; mfxU16 NumExtParam;
mfxExtBuffer **ExtParam; mfxExtBuffer **ExtParam;
mfxU16 NumPayload; mfxU16 NumPayload;
mfxPayload **Payload; mfxPayload **Payload;
} mfxPAKInput; } mfxPAKInput;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { MFX_DEPRECATED typedef struct {
mfxU16 reserved[32]; mfxU16 reserved[32];
mfxBitstream *Bs; mfxBitstream *Bs;
mfxFrameSurface1 *OutSurface; mfxFrameSurface1 *OutSurface;
mfxU16 NumExtParam; mfxU16 NumExtParam;
mfxExtBuffer **ExtParam; mfxExtBuffer **ExtParam;
} mfxPAKOutput; } mfxPAKOutput;
MFX_PACK_END() MFX_PACK_END()
typedef struct _mfxSession *mfxSession; typedef struct _mfxSession *mfxSession;
mfxStatus MFX_CDECL MFXVideoPAK_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out);
mfxStatus MFX_CDECL MFXVideoPAK_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest request[2]); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest request[2]);
mfxStatus MFX_CDECL MFXVideoPAK_Init(mfxSession session, mfxVideoParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_Init(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoPAK_Reset(mfxSession session, mfxVideoParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_Reset(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoPAK_Close(mfxSession session); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_Close(mfxSession session);
mfxStatus MFX_CDECL MFXVideoPAK_ProcessFrameAsync(mfxSession session, mfxPAKInput *in, mfxPAKOutput *out, mfxSyncPoint *syncp); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_ProcessFrameAsync(mfxSession session, mfxPAKInput *in, mfxPAKOutput *out, mfxSyncPoint *syncp);
mfxStatus MFX_CDECL MFXVideoPAK_GetVideoParam(mfxSession session, mfxVideoParam *par); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoPAK_GetVideoParam(mfxSession session, mfxVideoParam *par);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif

View File

@ -1,56 +0,0 @@
// Copyright (c) 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 __MFXPCP_H__
#define __MFXPCP_H__
#include "mfxstructures.h"
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
#if MFX_VERSION >= 1030
/* Protected in mfxVideoParam */
enum {
MFX_PROTECTION_CENC_WV_CLASSIC = 0x0004,
MFX_PROTECTION_CENC_WV_GOOGLE_DASH = 0x0005,
};
/* Extended Buffer Ids */
enum {
MFX_EXTBUFF_CENC_PARAM = MFX_MAKEFOURCC('C','E','N','P')
};
MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct _mfxExtCencParam{
mfxExtBuffer Header;
mfxU32 StatusReportIndex;
mfxU32 reserved[15];
} mfxExtCencParam;
MFX_PACK_END()
#endif
#ifdef __cplusplus
} // extern "C"
#endif /* __cplusplus */
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,216 +1,227 @@
// Copyright (c) 2018-2019 Intel Corporation // Copyright (c) 2018-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXPLUGIN_H__ #ifndef __MFXPLUGIN_H__
#define __MFXPLUGIN_H__ #define __MFXPLUGIN_H__
#include "mfxvideo.h" #include "mfxvideo.h"
#include "mfxaudio.h" #include "mfxaudio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxU8 Data[16]; mfxU8 Data[16];
} mfxPluginUID; } mfxPluginUID;
MFX_PACK_END() MFX_PACK_END()
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_SW = {{0x15, 0xdd, 0x93, 0x68, 0x25, 0xad, 0x47, 0x5e, 0xa3, 0x4e, 0x35, 0xf3, 0xf5, 0x42, 0x17, 0xa6}};
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_HEVCD_HW = {{0x33, 0xa6, 0x1c, 0x0b, 0x4c, 0x27, 0x45, 0x4c, 0xa8, 0xd8, 0x5d, 0xde, 0x75, 0x7c, 0x6f, 0x8e}};
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_SW = {{0x2f, 0xca, 0x99, 0x74, 0x9f, 0xdb, 0x49, 0xae, 0xb1, 0x21, 0xa5, 0xb6, 0x3e, 0xf5, 0x68, 0xf7}};
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_GACC = {{0xe5, 0x40, 0x0a, 0x06, 0xc7, 0x4d, 0x41, 0xf5, 0xb1, 0x2d, 0x43, 0x0b, 0xba, 0xa2, 0x3d, 0x0b}};
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_DP_GACC = {{0x2b, 0xad, 0x6f, 0x9d, 0x77, 0x54, 0x41, 0x2d, 0xbf, 0x63, 0x03, 0xed, 0x4b, 0xb5, 0x09, 0x68}};
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_HEVCE_HW = {{0x6f, 0xad, 0xc7, 0x91, 0xa0, 0xc2, 0xeb, 0x47, 0x9a, 0xb6, 0xdc, 0xd5, 0xea, 0x9d, 0xa3, 0x47}};
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_VP8D_HW = {{0xf6, 0x22, 0x39, 0x4d, 0x8d, 0x87, 0x45, 0x2f, 0x87, 0x8c, 0x51, 0xf2, 0xfc, 0x9b, 0x41, 0x31}};
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_VP8E_HW = {{0xbf, 0xfc, 0x51, 0x8c, 0xde, 0x13, 0x4d, 0xf9, 0x8a, 0x96, 0xf4, 0xcf, 0x81, 0x6c, 0x0f, 0xac}};
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_VP9E_HW = {{0xce, 0x44, 0xef, 0x6f, 0x1a, 0x6d, 0x22, 0x46, 0xb4, 0x12, 0xbb, 0x38, 0xd6, 0xe4, 0x51, 0x82}};
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_VP9D_HW = {{0xa9, 0x22, 0x39, 0x4d, 0x8d, 0x87, 0x45, 0x2f, 0x87, 0x8c, 0x51, 0xf2, 0xfc, 0x9b, 0x41, 0x31}};
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_CAMERA_HW = {{0x54, 0x54, 0x26, 0x16, 0x24, 0x33, 0x41, 0xe6, 0x93, 0xae, 0x89, 0x99, 0x42, 0xce, 0x73, 0x55}};
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_CAPTURE_HW = {{0x22, 0xd6, 0x2c, 0x07, 0xe6, 0x72, 0x40, 0x8f, 0xbb, 0x4c, 0xc2, 0x0e, 0xd7, 0xa0, 0x53, 0xe4}};
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_ITELECINE_HW = {{0xe7, 0x44, 0x75, 0x3a, 0xcd, 0x74, 0x40, 0x2e, 0x89, 0xa2, 0xee, 0x06, 0x35, 0x49, 0x61, 0x79}};
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_H264LA_HW = {{0x58, 0x8f, 0x11, 0x85, 0xd4, 0x7b, 0x42, 0x96, 0x8d, 0xea, 0x37, 0x7b, 0xb5, 0xd0, 0xdc, 0xb4}};
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_AACD = {{0xe9, 0x34, 0x67, 0x25, 0xac, 0x2f, 0x4c, 0x93, 0xaa, 0x58, 0x5c, 0x11, 0xc7, 0x08, 0x7c, 0xf4}};
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_AACE = {{0xb2, 0xa2, 0xa0, 0x5a, 0x4e, 0xac, 0x46, 0xbf, 0xa9, 0xde, 0x7e, 0x80, 0xc9, 0x8d, 0x2e, 0x18}};
static const mfxPluginUID MFX_PLUGINID_HEVCE_FEI_HW = {{0x87, 0xe0, 0xe8, 0x02, 0x07, 0x37, 0x52, 0x40, 0x85, 0x25, 0x15, 0xcf, 0x4a, 0x5e, 0xdd, 0xe6}}; 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) #if (MFX_VERSION >= 1027)
static const mfxPluginUID MFX_PLUGINID_HEVC_FEI_ENCODE = {{0x54, 0x18, 0xa7, 0x06, 0x66, 0xf9, 0x4d, 0x5c, 0xb4, 0xf7, 0xb1, 0xca, 0xee, 0x86, 0x33, 0x9b}}; 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 #endif
typedef enum { typedef enum {
MFX_PLUGINTYPE_VIDEO_GENERAL = 0, MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_GENERAL) = 0,
MFX_PLUGINTYPE_VIDEO_DECODE = 1, MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_DECODE) = 1,
MFX_PLUGINTYPE_VIDEO_ENCODE = 2, MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_ENCODE) = 2,
MFX_PLUGINTYPE_VIDEO_VPP = 3, MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_VPP) = 3,
MFX_PLUGINTYPE_VIDEO_ENC = 4, MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_VIDEO_ENC) = 4,
MFX_PLUGINTYPE_AUDIO_DECODE = 5, MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_AUDIO_DECODE) = 5,
MFX_PLUGINTYPE_AUDIO_ENCODE = 6 MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_PLUGINTYPE_AUDIO_ENCODE) = 6
} mfxPluginType; } mfxPluginType;
typedef enum { MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_GENERAL);
MFX_THREADPOLICY_SERIAL = 0, MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_DECODE);
MFX_THREADPOLICY_PARALLEL = 1 MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_ENCODE);
} mfxThreadPolicy; MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_VPP);
MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_VIDEO_ENC);
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_AUDIO_DECODE);
typedef struct mfxPluginParam { MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_PLUGINTYPE_AUDIO_ENCODE);
mfxU32 reserved[6];
mfxU16 reserved1; typedef enum {
mfxU16 PluginVersion; MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_THREADPOLICY_SERIAL) = 0,
mfxVersion APIVersion; MFX_DEPRECATED_ENUM_FIELD_INSIDE(MFX_THREADPOLICY_PARALLEL) = 1
mfxPluginUID PluginUID; } mfxThreadPolicy;
mfxU32 Type;
mfxU32 CodecId; MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_THREADPOLICY_SERIAL);
mfxThreadPolicy ThreadPolicy; MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(MFX_THREADPOLICY_PARALLEL);
mfxU32 MaxThreadNum;
} mfxPluginParam; MFX_PACK_BEGIN_USUAL_STRUCT()
MFX_PACK_END() MFX_DEPRECATED typedef struct mfxPluginParam {
mfxU32 reserved[6];
MFX_PACK_BEGIN_USUAL_STRUCT() mfxU16 reserved1;
typedef struct mfxCoreParam{ mfxU16 PluginVersion;
mfxU32 reserved[13]; mfxVersion APIVersion;
mfxIMPL Impl; mfxPluginUID PluginUID;
mfxVersion Version; mfxU32 Type;
mfxU32 NumWorkingThread; mfxU32 CodecId;
} mfxCoreParam; mfxThreadPolicy ThreadPolicy;
MFX_PACK_END() mfxU32 MaxThreadNum;
} mfxPluginParam;
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_END()
typedef struct mfxCoreInterface {
mfxHDL pthis; MFX_PACK_BEGIN_USUAL_STRUCT()
MFX_DEPRECATED typedef struct mfxCoreParam{
mfxHDL reserved1[2]; mfxU32 reserved[13];
mfxFrameAllocator FrameAllocator; mfxIMPL Impl;
mfxBufferAllocator reserved3; mfxVersion Version;
mfxU32 NumWorkingThread;
mfxStatus (MFX_CDECL *GetCoreParam)(mfxHDL pthis, mfxCoreParam *par); } mfxCoreParam;
mfxStatus (MFX_CDECL *GetHandle) (mfxHDL pthis, mfxHandleType type, mfxHDL *handle); MFX_PACK_END()
mfxStatus (MFX_CDECL *IncreaseReference) (mfxHDL pthis, mfxFrameData *fd);
mfxStatus (MFX_CDECL *DecreaseReference) (mfxHDL pthis, mfxFrameData *fd); MFX_PACK_BEGIN_STRUCT_W_PTR()
mfxStatus (MFX_CDECL *CopyFrame) (mfxHDL pthis, mfxFrameSurface1 *dst, mfxFrameSurface1 *src); MFX_DEPRECATED typedef struct mfxCoreInterface {
mfxStatus (MFX_CDECL *CopyBuffer)(mfxHDL pthis, mfxU8 *dst, mfxU32 size, mfxFrameSurface1 *src); mfxHDL pthis;
mfxStatus (MFX_CDECL *MapOpaqueSurface)(mfxHDL pthis, mfxU32 num, mfxU32 type, mfxFrameSurface1 **op_surf); mfxHDL reserved1[2];
mfxStatus (MFX_CDECL *UnmapOpaqueSurface)(mfxHDL pthis, mfxU32 num, mfxU32 type, mfxFrameSurface1 **op_surf); mfxFrameAllocator FrameAllocator;
mfxBufferAllocator reserved3;
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 *GetCoreParam)(mfxHDL pthis, mfxCoreParam *par);
mfxStatus (MFX_CDECL *GetHandle) (mfxHDL pthis, mfxHandleType type, mfxHDL *handle);
mfxStatus (MFX_CDECL *CreateAccelerationDevice)(mfxHDL pthis, mfxHandleType type, mfxHDL *handle); mfxStatus (MFX_CDECL *IncreaseReference) (mfxHDL pthis, mfxFrameData *fd);
mfxStatus (MFX_CDECL *GetFrameHandle) (mfxHDL pthis, mfxFrameData *fd, mfxHDL *handle); mfxStatus (MFX_CDECL *DecreaseReference) (mfxHDL pthis, mfxFrameData *fd);
mfxStatus (MFX_CDECL *QueryPlatform) (mfxHDL pthis, mfxPlatform *platform); mfxStatus (MFX_CDECL *CopyFrame) (mfxHDL pthis, mfxFrameSurface1 *dst, mfxFrameSurface1 *src);
mfxStatus (MFX_CDECL *CopyBuffer)(mfxHDL pthis, mfxU8 *dst, mfxU32 size, mfxFrameSurface1 *src);
mfxHDL reserved4[1];
} mfxCoreInterface; mfxStatus (MFX_CDECL *MapOpaqueSurface)(mfxHDL pthis, mfxU32 num, mfxU32 type, mfxFrameSurface1 **op_surf);
MFX_PACK_END() mfxStatus (MFX_CDECL *UnmapOpaqueSurface)(mfxHDL pthis, mfxU32 num, mfxU32 type, mfxFrameSurface1 **op_surf);
MFX_PACK_BEGIN_STRUCT_W_PTR() mfxStatus (MFX_CDECL *GetRealSurface)(mfxHDL pthis, mfxFrameSurface1 *op_surf, mfxFrameSurface1 **surf);
/* video codec plugin extension */ mfxStatus (MFX_CDECL *GetOpaqueSurface)(mfxHDL pthis, mfxFrameSurface1 *surf, mfxFrameSurface1 **op_surf);
typedef struct _mfxENCInput mfxENCInput;
typedef struct _mfxENCOutput mfxENCOutput; mfxStatus (MFX_CDECL *CreateAccelerationDevice)(mfxHDL pthis, mfxHandleType type, mfxHDL *handle);
typedef struct mfxVideoCodecPlugin{ mfxStatus (MFX_CDECL *GetFrameHandle) (mfxHDL pthis, mfxFrameData *fd, mfxHDL *handle);
mfxStatus (MFX_CDECL *Query)(mfxHDL pthis, mfxVideoParam *in, mfxVideoParam *out); mfxStatus (MFX_CDECL *QueryPlatform) (mfxHDL pthis, mfxPlatform *platform);
mfxStatus (MFX_CDECL *QueryIOSurf)(mfxHDL pthis, mfxVideoParam *par, mfxFrameAllocRequest *in, mfxFrameAllocRequest *out);
mfxStatus (MFX_CDECL *Init)(mfxHDL pthis, mfxVideoParam *par); mfxHDL reserved4[1];
mfxStatus (MFX_CDECL *Reset)(mfxHDL pthis, mfxVideoParam *par); } mfxCoreInterface;
mfxStatus (MFX_CDECL *Close)(mfxHDL pthis); MFX_PACK_END()
mfxStatus (MFX_CDECL *GetVideoParam)(mfxHDL pthis, mfxVideoParam *par);
MFX_PACK_BEGIN_STRUCT_W_PTR()
mfxStatus (MFX_CDECL *EncodeFrameSubmit)(mfxHDL pthis, mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxThreadTask *task); /* video codec plugin extension */
MFX_DEPRECATED typedef struct _mfxENCInput mfxENCInput;
mfxStatus (MFX_CDECL *DecodeHeader)(mfxHDL pthis, mfxBitstream *bs, mfxVideoParam *par); MFX_DEPRECATED typedef struct _mfxENCOutput mfxENCOutput;
mfxStatus (MFX_CDECL *GetPayload)(mfxHDL pthis, mfxU64 *ts, mfxPayload *payload); MFX_DEPRECATED typedef struct mfxVideoCodecPlugin{
mfxStatus (MFX_CDECL *DecodeFrameSubmit)(mfxHDL pthis, mfxBitstream *bs, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task); 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 *VPPFrameSubmit)(mfxHDL pthis, mfxFrameSurface1 *in, mfxFrameSurface1 *out, mfxExtVppAuxData *aux, mfxThreadTask *task); mfxStatus (MFX_CDECL *Init)(mfxHDL pthis, mfxVideoParam *par);
mfxStatus (MFX_CDECL *VPPFrameSubmitEx)(mfxHDL pthis, mfxFrameSurface1 *in, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task); mfxStatus (MFX_CDECL *Reset)(mfxHDL pthis, mfxVideoParam *par);
mfxStatus (MFX_CDECL *Close)(mfxHDL pthis);
mfxStatus (MFX_CDECL *ENCFrameSubmit)(mfxHDL pthis, mfxENCInput *in, mfxENCOutput *out, mfxThreadTask *task); mfxStatus (MFX_CDECL *GetVideoParam)(mfxHDL pthis, mfxVideoParam *par);
mfxHDL reserved1[3]; mfxStatus (MFX_CDECL *EncodeFrameSubmit)(mfxHDL pthis, mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxThreadTask *task);
mfxU32 reserved2[8];
} mfxVideoCodecPlugin; mfxStatus (MFX_CDECL *DecodeHeader)(mfxHDL pthis, mfxBitstream *bs, mfxVideoParam *par);
MFX_PACK_END() 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);
MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct mfxAudioCodecPlugin{ mfxStatus (MFX_CDECL *VPPFrameSubmit)(mfxHDL pthis, mfxFrameSurface1 *in, mfxFrameSurface1 *out, mfxExtVppAuxData *aux, mfxThreadTask *task);
mfxStatus (MFX_CDECL *Query)(mfxHDL pthis, mfxAudioParam *in, mfxAudioParam *out); mfxStatus (MFX_CDECL *VPPFrameSubmitEx)(mfxHDL pthis, mfxFrameSurface1 *in, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxThreadTask *task);
mfxStatus (MFX_CDECL *QueryIOSize)(mfxHDL pthis, mfxAudioParam *par, mfxAudioAllocRequest *request);
mfxStatus (MFX_CDECL *Init)(mfxHDL pthis, mfxAudioParam *par); mfxStatus (MFX_CDECL *ENCFrameSubmit)(mfxHDL pthis, mfxENCInput *in, mfxENCOutput *out, mfxThreadTask *task);
mfxStatus (MFX_CDECL *Reset)(mfxHDL pthis, mfxAudioParam *par);
mfxStatus (MFX_CDECL *Close)(mfxHDL pthis); mfxHDL reserved1[3];
mfxStatus (MFX_CDECL *GetAudioParam)(mfxHDL pthis, mfxAudioParam *par); mfxU32 reserved2[8];
} mfxVideoCodecPlugin;
mfxStatus (MFX_CDECL *EncodeFrameSubmit)(mfxHDL pthis, mfxAudioFrame *aFrame, mfxBitstream *out, mfxThreadTask *task); MFX_PACK_END()
mfxStatus (MFX_CDECL *DecodeHeader)(mfxHDL pthis, mfxBitstream *bs, mfxAudioParam *par); MFX_PACK_BEGIN_STRUCT_W_PTR()
// mfxStatus (MFX_CDECL *GetPayload)(mfxHDL pthis, mfxU64 *ts, mfxPayload *payload); MFX_DEPRECATED typedef struct mfxAudioCodecPlugin{
mfxStatus (MFX_CDECL *DecodeFrameSubmit)(mfxHDL pthis, mfxBitstream *in, mfxAudioFrame *out, mfxThreadTask *task); mfxStatus (MFX_CDECL *Query)(mfxHDL pthis, mfxAudioParam *in, mfxAudioParam *out);
mfxStatus (MFX_CDECL *QueryIOSize)(mfxHDL pthis, mfxAudioParam *par, mfxAudioAllocRequest *request);
mfxHDL reserved1[6]; mfxStatus (MFX_CDECL *Init)(mfxHDL pthis, mfxAudioParam *par);
mfxU32 reserved2[8]; mfxStatus (MFX_CDECL *Reset)(mfxHDL pthis, mfxAudioParam *par);
} mfxAudioCodecPlugin; mfxStatus (MFX_CDECL *Close)(mfxHDL pthis);
MFX_PACK_END() mfxStatus (MFX_CDECL *GetAudioParam)(mfxHDL pthis, mfxAudioParam *par);
MFX_PACK_BEGIN_STRUCT_W_PTR() mfxStatus (MFX_CDECL *EncodeFrameSubmit)(mfxHDL pthis, mfxAudioFrame *aFrame, mfxBitstream *out, mfxThreadTask *task);
typedef struct mfxPlugin{
mfxHDL pthis; mfxStatus (MFX_CDECL *DecodeHeader)(mfxHDL pthis, mfxBitstream *bs, mfxAudioParam *par);
// mfxStatus (MFX_CDECL *GetPayload)(mfxHDL pthis, mfxU64 *ts, mfxPayload *payload);
mfxStatus (MFX_CDECL *PluginInit) (mfxHDL pthis, mfxCoreInterface *core); mfxStatus (MFX_CDECL *DecodeFrameSubmit)(mfxHDL pthis, mfxBitstream *in, mfxAudioFrame *out, mfxThreadTask *task);
mfxStatus (MFX_CDECL *PluginClose) (mfxHDL pthis);
mfxHDL reserved1[6];
mfxStatus (MFX_CDECL *GetPluginParam)(mfxHDL pthis, mfxPluginParam *par); mfxU32 reserved2[8];
} mfxAudioCodecPlugin;
mfxStatus (MFX_CDECL *Submit)(mfxHDL pthis, const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxThreadTask *task); MFX_PACK_END()
mfxStatus (MFX_CDECL *Execute)(mfxHDL pthis, mfxThreadTask task, mfxU32 uid_p, mfxU32 uid_a);
mfxStatus (MFX_CDECL *FreeResources)(mfxHDL pthis, mfxThreadTask task, mfxStatus sts); MFX_PACK_BEGIN_STRUCT_W_PTR()
MFX_DEPRECATED typedef struct mfxPlugin{
union { mfxHDL pthis;
mfxVideoCodecPlugin *Video;
mfxAudioCodecPlugin *Audio; mfxStatus (MFX_CDECL *PluginInit) (mfxHDL pthis, mfxCoreInterface *core);
}; mfxStatus (MFX_CDECL *PluginClose) (mfxHDL pthis);
mfxHDL reserved[8]; mfxStatus (MFX_CDECL *GetPluginParam)(mfxHDL pthis, mfxPluginParam *par);
} mfxPlugin;
MFX_PACK_END() 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);
mfxStatus MFX_CDECL MFXVideoUSER_Register(mfxSession session, mfxU32 type, const mfxPlugin *par);
mfxStatus MFX_CDECL MFXVideoUSER_Unregister(mfxSession session, mfxU32 type); union {
mfxStatus MFX_CDECL MFXVideoUSER_GetPlugin(mfxSession session, mfxU32 type, mfxPlugin *par); mfxVideoCodecPlugin *Video;
mfxStatus MFX_CDECL MFXVideoUSER_ProcessFrameAsync(mfxSession session, const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxSyncPoint *syncp); mfxAudioCodecPlugin *Audio;
};
mfxStatus MFX_CDECL MFXVideoUSER_Load(mfxSession session, const mfxPluginUID *uid, mfxU32 version);
mfxStatus MFX_CDECL MFXVideoUSER_LoadByPath(mfxSession session, const mfxPluginUID *uid, mfxU32 version, const mfxChar *path, mfxU32 len); mfxHDL reserved[8];
mfxStatus MFX_CDECL MFXVideoUSER_UnLoad(mfxSession session, const mfxPluginUID *uid); } mfxPlugin;
MFX_PACK_END()
mfxStatus MFX_CDECL MFXAudioUSER_Register(mfxSession session, mfxU32 type, const mfxPlugin *par);
mfxStatus MFX_CDECL MFXAudioUSER_Unregister(mfxSession session, mfxU32 type);
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 MFXVideoUSER_Register(mfxSession session, mfxU32 type, const mfxPlugin *par);
MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_Unregister(mfxSession session, mfxU32 type);
mfxStatus MFX_CDECL MFXAudioUSER_Load(mfxSession session, const mfxPluginUID *uid, mfxU32 version); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_GetPlugin(mfxSession session, mfxU32 type, mfxPlugin *par);
mfxStatus MFX_CDECL MFXAudioUSER_UnLoad(mfxSession session, const mfxPluginUID *uid); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_ProcessFrameAsync(mfxSession session, const mfxHDL *in, mfxU32 in_num, const mfxHDL *out, mfxU32 out_num, mfxSyncPoint *syncp);
#ifdef __cplusplus MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_Load(mfxSession session, const mfxPluginUID *uid, mfxU32 version);
} // extern "C" MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_LoadByPath(mfxSession session, const mfxPluginUID *uid, mfxU32 version, const mfxChar *path, mfxU32 len);
#endif /* __cplusplus */ MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoUSER_UnLoad(mfxSession session, const mfxPluginUID *uid);
#endif /* __MFXPLUGIN_H__ */ 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__ */

View File

@ -1,54 +1,54 @@
// Copyright (c) 2018-2019 Intel Corporation // Copyright (c) 2018-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXSC_H__ #ifndef __MFXSC_H__
#define __MFXSC_H__ #define __MFXSC_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#include "mfxvstructures.h" #include "mfxvstructures.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* Extended Buffer Ids */ /* Extended Buffer Ids */
enum enum
{ {
MFX_EXTBUFF_SCREEN_CAPTURE_PARAM = MFX_MAKEFOURCC('S','C','P','A') MFX_EXTBUFF_SCREEN_CAPTURE_PARAM = MFX_MAKEFOURCC('S','C','P','A')
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct typedef struct
{ {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU32 DisplayIndex; mfxU32 DisplayIndex;
mfxU16 EnableDirtyRect; mfxU16 EnableDirtyRect;
mfxU16 EnableCursorCapture; mfxU16 EnableCursorCapture;
mfxU16 reserved[24]; mfxU16 reserved[24];
} mfxExtScreenCaptureParam; } mfxExtScreenCaptureParam;
MFX_PACK_END() MFX_PACK_END()
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif

View File

@ -1,61 +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 __MFXSCD_H__
#define __MFXSCD_H__
#include "mfxenc.h"
#include "mfxplugin.h"
#define MFX_ENC_SCD_PLUGIN_VERSION 1
#ifdef __cplusplus
extern "C" {
#endif
static const mfxPluginUID MFX_PLUGINID_ENC_SCD = {{ 0xdf, 0xc2, 0x15, 0xb3, 0xe3, 0xd3, 0x90, 0x4d, 0x7f, 0xa5, 0x04, 0x12, 0x7e, 0xf5, 0x64, 0xd5 }};
/* SCD Extended Buffer Ids */
enum {
MFX_EXTBUFF_SCD = MFX_MAKEFOURCC('S','C','D',' ')
};
/* SceneType */
enum {
MFX_SCD_SCENE_SAME = 0x00,
MFX_SCD_SCENE_NEW_FIELD_1 = 0x01,
MFX_SCD_SCENE_NEW_FIELD_2 = 0x02,
MFX_SCD_SCENE_NEW_PICTURE = MFX_SCD_SCENE_NEW_FIELD_1 | MFX_SCD_SCENE_NEW_FIELD_2
};
MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct {
mfxExtBuffer Header;
mfxU16 SceneType;
mfxU16 reserved[27];
} mfxExtSCD;
MFX_PACK_END()
#ifdef __cplusplus
} // extern "C"
#endif
#endif

View File

@ -1,50 +1,50 @@
// Copyright (c) 2017 Intel Corporation // Copyright (c) 2017 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXSESSION_H__ #ifndef __MFXSESSION_H__
#define __MFXSESSION_H__ #define __MFXSESSION_H__
#include "mfxcommon.h" #include "mfxcommon.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* Global Functions */ /* Global Functions */
typedef struct _mfxSession *mfxSession; typedef struct _mfxSession *mfxSession;
mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session); mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session);
mfxStatus MFX_CDECL MFXInitEx(mfxInitParam par, mfxSession *session); mfxStatus MFX_CDECL MFXInitEx(mfxInitParam par, mfxSession *session);
mfxStatus MFX_CDECL MFXClose(mfxSession session); mfxStatus MFX_CDECL MFXClose(mfxSession session);
mfxStatus MFX_CDECL MFXQueryIMPL(mfxSession session, mfxIMPL *impl); mfxStatus MFX_CDECL MFXQueryIMPL(mfxSession session, mfxIMPL *impl);
mfxStatus MFX_CDECL MFXQueryVersion(mfxSession session, mfxVersion *version); mfxStatus MFX_CDECL MFXQueryVersion(mfxSession session, mfxVersion *version);
mfxStatus MFX_CDECL MFXJoinSession(mfxSession session, mfxSession child); mfxStatus MFX_CDECL MFXJoinSession(mfxSession session, mfxSession child);
mfxStatus MFX_CDECL MFXDisjoinSession(mfxSession session); mfxStatus MFX_CDECL MFXDisjoinSession(mfxSession session);
mfxStatus MFX_CDECL MFXCloneSession(mfxSession session, mfxSession *clone); mfxStatus MFX_CDECL MFXCloneSession(mfxSession session, mfxSession *clone);
mfxStatus MFX_CDECL MFXSetPriority(mfxSession session, mfxPriority priority); mfxStatus MFX_CDECL MFXSetPriority(mfxSession session, mfxPriority priority);
mfxStatus MFX_CDECL MFXGetPriority(mfxSession session, mfxPriority *priority); mfxStatus MFX_CDECL MFXGetPriority(mfxSession session, mfxPriority *priority);
mfxStatus MFX_CDECL MFXDoWork(mfxSession session); MFX_DEPRECATED mfxStatus MFX_CDECL MFXDoWork(mfxSession session);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -1,188 +1,188 @@
// Copyright (c) 2017 Intel Corporation // Copyright (c) 2017 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXVIDEOPLUSPLUS_H #ifndef __MFXVIDEOPLUSPLUS_H
#define __MFXVIDEOPLUSPLUS_H #define __MFXVIDEOPLUSPLUS_H
#include "mfxvideo.h" #include "mfxvideo.h"
#include "mfxenc.h" #include "mfxenc.h"
#include "mfxpak.h" #include "mfxpak.h"
class MFXVideoSession class MFXVideoSession
{ {
public: public:
MFXVideoSession(void) { m_session = (mfxSession) 0; } MFXVideoSession(void) { m_session = (mfxSession) 0; }
virtual ~MFXVideoSession(void) { Close(); } virtual ~MFXVideoSession(void) { Close(); }
virtual mfxStatus Init(mfxIMPL impl, mfxVersion *ver) { return MFXInit(impl, ver, &m_session); } 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 InitEx(mfxInitParam par) { return MFXInitEx(par, &m_session); }
virtual mfxStatus Close(void) virtual mfxStatus Close(void)
{ {
mfxStatus mfxRes; mfxStatus mfxRes;
mfxRes = MFXClose(m_session); m_session = (mfxSession) 0; mfxRes = MFXClose(m_session); m_session = (mfxSession) 0;
return mfxRes; return mfxRes;
} }
virtual mfxStatus QueryIMPL(mfxIMPL *impl) { return MFXQueryIMPL(m_session, impl); } virtual mfxStatus QueryIMPL(mfxIMPL *impl) { return MFXQueryIMPL(m_session, impl); }
virtual mfxStatus QueryVersion(mfxVersion *version) { return MFXQueryVersion(m_session, version); } virtual mfxStatus QueryVersion(mfxVersion *version) { return MFXQueryVersion(m_session, version); }
virtual mfxStatus JoinSession(mfxSession child_session) { return MFXJoinSession(m_session, child_session);} virtual mfxStatus JoinSession(mfxSession child_session) { return MFXJoinSession(m_session, child_session);}
virtual mfxStatus DisjoinSession( ) { return MFXDisjoinSession(m_session);} virtual mfxStatus DisjoinSession( ) { return MFXDisjoinSession(m_session);}
virtual mfxStatus CloneSession( mfxSession *clone) { return MFXCloneSession(m_session, clone);} virtual mfxStatus CloneSession( mfxSession *clone) { return MFXCloneSession(m_session, clone);}
virtual mfxStatus SetPriority( mfxPriority priority) { return MFXSetPriority(m_session, priority);} virtual mfxStatus SetPriority( mfxPriority priority) { return MFXSetPriority(m_session, priority);}
virtual mfxStatus GetPriority( mfxPriority *priority) { return MFXGetPriority(m_session, priority);} virtual mfxStatus GetPriority( mfxPriority *priority) { return MFXGetPriority(m_session, priority);}
virtual mfxStatus SetBufferAllocator(mfxBufferAllocator *allocator) { return MFXVideoCORE_SetBufferAllocator(m_session, allocator); } 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 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 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 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 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 SyncOperation(mfxSyncPoint syncp, mfxU32 wait) { return MFXVideoCORE_SyncOperation(m_session, syncp, wait); }
virtual mfxStatus DoWork() { return MFXDoWork(m_session); } virtual mfxStatus DoWork() { return MFXDoWork(m_session); }
virtual operator mfxSession (void) { return m_session; } virtual operator mfxSession (void) { return m_session; }
protected: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
private: private:
MFXVideoSession(const MFXVideoSession &); MFXVideoSession(const MFXVideoSession &);
void operator=(MFXVideoSession &); void operator=(MFXVideoSession &);
}; };
class MFXVideoENCODE class MFXVideoENCODE
{ {
public: public:
MFXVideoENCODE(mfxSession session) { m_session = session; } MFXVideoENCODE(mfxSession session) { m_session = session; }
virtual ~MFXVideoENCODE(void) { Close(); } virtual ~MFXVideoENCODE(void) { Close(); }
virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoENCODE_Query(m_session, in, out); } 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 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 Init(mfxVideoParam *par) { return MFXVideoENCODE_Init(m_session, par); }
virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoENCODE_Reset(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 Close(void) { return MFXVideoENCODE_Close(m_session); }
virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoENCODE_GetVideoParam(m_session, par); } virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoENCODE_GetVideoParam(m_session, par); }
virtual mfxStatus GetEncodeStat(mfxEncodeStat *stat) { return MFXVideoENCODE_GetEncodeStat(m_session, stat); } 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); } virtual mfxStatus EncodeFrameAsync(mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxSyncPoint *syncp) { return MFXVideoENCODE_EncodeFrameAsync(m_session, ctrl, surface, bs, syncp); }
protected: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
}; };
class MFXVideoDECODE class MFXVideoDECODE
{ {
public: public:
MFXVideoDECODE(mfxSession session) { m_session = session; } MFXVideoDECODE(mfxSession session) { m_session = session; }
virtual ~MFXVideoDECODE(void) { Close(); } virtual ~MFXVideoDECODE(void) { Close(); }
virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoDECODE_Query(m_session, in, out); } 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 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 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 Init(mfxVideoParam *par) { return MFXVideoDECODE_Init(m_session, par); }
virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoDECODE_Reset(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 Close(void) { return MFXVideoDECODE_Close(m_session); }
virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoDECODE_GetVideoParam(m_session, par); } virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoDECODE_GetVideoParam(m_session, par); }
virtual mfxStatus GetDecodeStat(mfxDecodeStat *stat) { return MFXVideoDECODE_GetDecodeStat(m_session, stat); } 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 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 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); } 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: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
}; };
class MFXVideoVPP class MFXVideoVPP
{ {
public: public:
MFXVideoVPP(mfxSession session) { m_session = session; } MFXVideoVPP(mfxSession session) { m_session = session; }
virtual ~MFXVideoVPP(void) { Close(); } virtual ~MFXVideoVPP(void) { Close(); }
virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoVPP_Query(m_session, in, out); } 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 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 Init(mfxVideoParam *par) { return MFXVideoVPP_Init(m_session, par); }
virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoVPP_Reset(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 Close(void) { return MFXVideoVPP_Close(m_session); }
virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoVPP_GetVideoParam(m_session, par); } virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoVPP_GetVideoParam(m_session, par); }
virtual mfxStatus GetVPPStat(mfxVPPStat *stat) { return MFXVideoVPP_GetVPPStat(m_session, stat); } 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 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); } virtual mfxStatus RunFrameVPPAsyncEx(mfxFrameSurface1 *in, mfxFrameSurface1 *work, mfxFrameSurface1 **out, mfxSyncPoint *syncp) {return MFXVideoVPP_RunFrameVPPAsyncEx(m_session, in, work, out, syncp); }
protected: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
}; };
class MFXVideoENC class MFXVideoENC
{ {
public: public:
MFXVideoENC(mfxSession session) { m_session = session; } MFXVideoENC(mfxSession session) { m_session = session; }
virtual ~MFXVideoENC(void) { Close(); } virtual ~MFXVideoENC(void) { Close(); }
virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoENC_Query(m_session, in, out); } 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 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 Init(mfxVideoParam *par) { return MFXVideoENC_Init(m_session, par); }
virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoENC_Reset(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 Close(void) { return MFXVideoENC_Close(m_session); }
virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoENC_GetVideoParam(m_session, par); } 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); } virtual mfxStatus ProcessFrameAsync(mfxENCInput *in, mfxENCOutput *out, mfxSyncPoint *syncp) { return MFXVideoENC_ProcessFrameAsync(m_session, in, out, syncp); }
protected: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
}; };
class MFXVideoPAK class MFXVideoPAK
{ {
public: public:
MFXVideoPAK(mfxSession session) { m_session = session; } MFXVideoPAK(mfxSession session) { m_session = session; }
virtual ~MFXVideoPAK(void) { Close(); } virtual ~MFXVideoPAK(void) { Close(); }
virtual mfxStatus Query(mfxVideoParam *in, mfxVideoParam *out) { return MFXVideoPAK_Query(m_session, in, out); } 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 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 Init(mfxVideoParam *par) { return MFXVideoPAK_Init(m_session, par); }
virtual mfxStatus Reset(mfxVideoParam *par) { return MFXVideoPAK_Reset(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 Close(void) { return MFXVideoPAK_Close(m_session); }
virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoPAK_GetVideoParam(m_session, par); } virtual mfxStatus GetVideoParam(mfxVideoParam *par) { return MFXVideoPAK_GetVideoParam(m_session, par); }
//virtual mfxStatus GetEncodeStat(mfxEncodeStat *stat) { return MFXVideoENCODE_GetEncodeStat(m_session, stat); } //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); } virtual mfxStatus ProcessFrameAsync(mfxPAKInput *in, mfxPAKOutput *out, mfxSyncPoint *syncp) { return MFXVideoPAK_ProcessFrameAsync(m_session, in, out, syncp); }
protected: protected:
mfxSession m_session; // (mfxSession) handle to the owning session mfxSession m_session; // (mfxSession) handle to the owning session
}; };
#endif // __MFXVIDEOPLUSPLUS_H #endif // __MFXVIDEOPLUSPLUS_H

View File

@ -1,104 +1,104 @@
// Copyright (c) 2017-2019 Intel Corporation // Copyright (c) 2017-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXVIDEO_H__ #ifndef __MFXVIDEO_H__
#define __MFXVIDEO_H__ #define __MFXVIDEO_H__
#include "mfxsession.h" #include "mfxsession.h"
#include "mfxvstructures.h" #include "mfxvstructures.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/* MFXVideoCORE */ /* MFXVideoCORE */
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxU32 reserved[4]; mfxU32 reserved[4];
mfxHDL pthis; mfxHDL pthis;
mfxStatus (MFX_CDECL *Alloc) (mfxHDL pthis, mfxU32 nbytes, mfxU16 type, mfxMemId *mid); 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 *Lock) (mfxHDL pthis, mfxMemId mid, mfxU8 **ptr);
mfxStatus (MFX_CDECL *Unlock) (mfxHDL pthis, mfxMemId mid); mfxStatus (MFX_CDECL *Unlock) (mfxHDL pthis, mfxMemId mid);
mfxStatus (MFX_CDECL *Free) (mfxHDL pthis, mfxMemId mid); mfxStatus (MFX_CDECL *Free) (mfxHDL pthis, mfxMemId mid);
} mfxBufferAllocator; } mfxBufferAllocator;
MFX_PACK_END() MFX_PACK_END()
MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_STRUCT_W_PTR()
typedef struct { typedef struct {
mfxU32 reserved[4]; mfxU32 reserved[4];
mfxHDL pthis; mfxHDL pthis;
mfxStatus (MFX_CDECL *Alloc) (mfxHDL pthis, mfxFrameAllocRequest *request, mfxFrameAllocResponse *response); mfxStatus (MFX_CDECL *Alloc) (mfxHDL pthis, mfxFrameAllocRequest *request, mfxFrameAllocResponse *response);
mfxStatus (MFX_CDECL *Lock) (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr); mfxStatus (MFX_CDECL *Lock) (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr);
mfxStatus (MFX_CDECL *Unlock) (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 *GetHDL) (mfxHDL pthis, mfxMemId mid, mfxHDL *handle);
mfxStatus (MFX_CDECL *Free) (mfxHDL pthis, mfxFrameAllocResponse *response); mfxStatus (MFX_CDECL *Free) (mfxHDL pthis, mfxFrameAllocResponse *response);
} mfxFrameAllocator; } mfxFrameAllocator;
MFX_PACK_END() MFX_PACK_END()
/* VideoCORE */ /* VideoCORE */
mfxStatus MFX_CDECL MFXVideoCORE_SetBufferAllocator(mfxSession session, mfxBufferAllocator *allocator); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoCORE_SetBufferAllocator(mfxSession session, mfxBufferAllocator *allocator);
mfxStatus MFX_CDECL MFXVideoCORE_SetFrameAllocator(mfxSession session, mfxFrameAllocator *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_SetHandle(mfxSession session, mfxHandleType type, mfxHDL hdl);
mfxStatus MFX_CDECL MFXVideoCORE_GetHandle(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_QueryPlatform(mfxSession session, mfxPlatform* platform);
mfxStatus MFX_CDECL MFXVideoCORE_SyncOperation(mfxSession session, mfxSyncPoint syncp, mfxU32 wait); mfxStatus MFX_CDECL MFXVideoCORE_SyncOperation(mfxSession session, mfxSyncPoint syncp, mfxU32 wait);
/* VideoENCODE */ /* VideoENCODE */
mfxStatus MFX_CDECL MFXVideoENCODE_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); 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_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest *request);
mfxStatus MFX_CDECL MFXVideoENCODE_Init(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoENCODE_Init(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoENCODE_Reset(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoENCODE_Reset(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoENCODE_Close(mfxSession session); mfxStatus MFX_CDECL MFXVideoENCODE_Close(mfxSession session);
mfxStatus MFX_CDECL MFXVideoENCODE_GetVideoParam(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoENCODE_GetVideoParam(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoENCODE_GetEncodeStat(mfxSession session, mfxEncodeStat *stat); mfxStatus MFX_CDECL MFXVideoENCODE_GetEncodeStat(mfxSession session, mfxEncodeStat *stat);
mfxStatus MFX_CDECL MFXVideoENCODE_EncodeFrameAsync(mfxSession session, mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxSyncPoint *syncp); mfxStatus MFX_CDECL MFXVideoENCODE_EncodeFrameAsync(mfxSession session, mfxEncodeCtrl *ctrl, mfxFrameSurface1 *surface, mfxBitstream *bs, mfxSyncPoint *syncp);
/* VideoDECODE */ /* VideoDECODE */
mfxStatus MFX_CDECL MFXVideoDECODE_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); 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_DecodeHeader(mfxSession session, mfxBitstream *bs, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoDECODE_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest *request); mfxStatus MFX_CDECL MFXVideoDECODE_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest *request);
mfxStatus MFX_CDECL MFXVideoDECODE_Init(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoDECODE_Init(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoDECODE_Reset(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoDECODE_Reset(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoDECODE_Close(mfxSession session); mfxStatus MFX_CDECL MFXVideoDECODE_Close(mfxSession session);
mfxStatus MFX_CDECL MFXVideoDECODE_GetVideoParam(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoDECODE_GetVideoParam(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoDECODE_GetDecodeStat(mfxSession session, mfxDecodeStat *stat); mfxStatus MFX_CDECL MFXVideoDECODE_GetDecodeStat(mfxSession session, mfxDecodeStat *stat);
mfxStatus MFX_CDECL MFXVideoDECODE_SetSkipMode(mfxSession session, mfxSkipMode mode); mfxStatus MFX_CDECL MFXVideoDECODE_SetSkipMode(mfxSession session, mfxSkipMode mode);
mfxStatus MFX_CDECL MFXVideoDECODE_GetPayload(mfxSession session, mfxU64 *ts, mfxPayload *payload); 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); mfxStatus MFX_CDECL MFXVideoDECODE_DecodeFrameAsync(mfxSession session, mfxBitstream *bs, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxSyncPoint *syncp);
/* VideoVPP */ /* VideoVPP */
mfxStatus MFX_CDECL MFXVideoVPP_Query(mfxSession session, mfxVideoParam *in, mfxVideoParam *out); 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_QueryIOSurf(mfxSession session, mfxVideoParam *par, mfxFrameAllocRequest request[2]);
mfxStatus MFX_CDECL MFXVideoVPP_Init(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoVPP_Init(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoVPP_Reset(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoVPP_Reset(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoVPP_Close(mfxSession session); mfxStatus MFX_CDECL MFXVideoVPP_Close(mfxSession session);
mfxStatus MFX_CDECL MFXVideoVPP_GetVideoParam(mfxSession session, mfxVideoParam *par); mfxStatus MFX_CDECL MFXVideoVPP_GetVideoParam(mfxSession session, mfxVideoParam *par);
mfxStatus MFX_CDECL MFXVideoVPP_GetVPPStat(mfxSession session, mfxVPPStat *stat); mfxStatus MFX_CDECL MFXVideoVPP_GetVPPStat(mfxSession session, mfxVPPStat *stat);
mfxStatus MFX_CDECL MFXVideoVPP_RunFrameVPPAsync(mfxSession session, mfxFrameSurface1 *in, mfxFrameSurface1 *out, mfxExtVppAuxData *aux, mfxSyncPoint *syncp); mfxStatus MFX_CDECL MFXVideoVPP_RunFrameVPPAsync(mfxSession session, mfxFrameSurface1 *in, mfxFrameSurface1 *out, mfxExtVppAuxData *aux, mfxSyncPoint *syncp);
mfxStatus MFX_CDECL MFXVideoVPP_RunFrameVPPAsyncEx(mfxSession session, mfxFrameSurface1 *in, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxSyncPoint *syncp); MFX_DEPRECATED mfxStatus MFX_CDECL MFXVideoVPP_RunFrameVPPAsyncEx(mfxSession session, mfxFrameSurface1 *in, mfxFrameSurface1 *surface_work, mfxFrameSurface1 **surface_out, mfxSyncPoint *syncp);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif #endif

View File

@ -1,71 +1,71 @@
// Copyright (c) 2017-2019 Intel Corporation // Copyright (c) 2017-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXVP8_H__ #ifndef __MFXVP8_H__
#define __MFXVP8_H__ #define __MFXVP8_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
enum { enum {
MFX_CODEC_VP8 = MFX_MAKEFOURCC('V','P','8',' '), MFX_CODEC_VP8 = MFX_MAKEFOURCC('V','P','8',' '),
}; };
/* CodecProfile*/ /* CodecProfile*/
enum { enum {
MFX_PROFILE_VP8_0 = 0+1, MFX_PROFILE_VP8_0 = 0+1,
MFX_PROFILE_VP8_1 = 1+1, MFX_PROFILE_VP8_1 = 1+1,
MFX_PROFILE_VP8_2 = 2+1, MFX_PROFILE_VP8_2 = 2+1,
MFX_PROFILE_VP8_3 = 3+1, MFX_PROFILE_VP8_3 = 3+1,
}; };
/* Extended Buffer Ids */ /* Extended Buffer Ids */
enum { enum {
MFX_EXTBUFF_VP8_CODING_OPTION = MFX_MAKEFOURCC('V','P','8','E'), MFX_EXTBUFF_VP8_CODING_OPTION = MFX_MAKEFOURCC('V','P','8','E'),
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 Version; mfxU16 Version;
mfxU16 EnableMultipleSegments; mfxU16 EnableMultipleSegments;
mfxU16 LoopFilterType; mfxU16 LoopFilterType;
mfxU16 LoopFilterLevel[4]; mfxU16 LoopFilterLevel[4];
mfxU16 SharpnessLevel; mfxU16 SharpnessLevel;
mfxU16 NumTokenPartitions; mfxU16 NumTokenPartitions;
mfxI16 LoopFilterRefTypeDelta[4]; mfxI16 LoopFilterRefTypeDelta[4];
mfxI16 LoopFilterMbModeDelta[4]; mfxI16 LoopFilterMbModeDelta[4];
mfxI16 SegmentQPDelta[4]; mfxI16 SegmentQPDelta[4];
mfxI16 CoeffTypeQPDelta[5]; mfxI16 CoeffTypeQPDelta[5];
mfxU16 WriteIVFHeaders; mfxU16 WriteIVFHeaders;
mfxU32 NumFramesForIVFHeader; mfxU32 NumFramesForIVFHeader;
mfxU16 reserved[223]; mfxU16 reserved[223];
} mfxExtVP8CodingOption; } mfxExtVP8CodingOption;
MFX_PACK_END() MFX_PACK_END()
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif #endif

View File

@ -1,53 +1,53 @@
// Copyright (c) 2018-2019 Intel Corporation // Copyright (c) 2018-2019 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#ifndef __MFXVP9_H__ #ifndef __MFXVP9_H__
#define __MFXVP9_H__ #define __MFXVP9_H__
#include "mfxdefs.h" #include "mfxdefs.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if (MFX_VERSION >= MFX_VERSION_NEXT) #if (MFX_VERSION >= MFX_VERSION_NEXT)
/* Extended Buffer Ids */ /* Extended Buffer Ids */
enum { enum {
MFX_EXTBUFF_VP9_DECODED_FRAME_INFO = MFX_MAKEFOURCC('9','D','F','I') MFX_EXTBUFF_VP9_DECODED_FRAME_INFO = MFX_MAKEFOURCC('9','D','F','I')
}; };
MFX_PACK_BEGIN_USUAL_STRUCT() MFX_PACK_BEGIN_USUAL_STRUCT()
typedef struct { typedef struct {
mfxExtBuffer Header; mfxExtBuffer Header;
mfxU16 DisplayWidth; mfxU16 DisplayWidth;
mfxU16 DisplayHeight; mfxU16 DisplayHeight;
mfxU16 reserved[58]; mfxU16 reserved[58];
} mfxExtVP9DecodedFrameInfo; } mfxExtVP9DecodedFrameInfo;
MFX_PACK_END() MFX_PACK_END()
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif #endif

View File

@ -1,22 +1,22 @@
// Copyright (c) 2017 Intel Corporation // Copyright (c) 2017 Intel Corporation
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights // in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is // copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: // furnished to do so, subject to the following conditions:
// //
// The above copyright notice and this permission notice shall be included in all // The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software. // copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // 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 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE. // SOFTWARE.
#include "mfxstructures.h" #include "mfxstructures.h"

Binary file not shown.

Binary file not shown.