| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#ifndef __MEDIA_INTERFACES_MHW_H__ |
| 28 |
#define __MEDIA_INTERFACES_MHW_H__ |
| 29 |
|
| 30 |
#include "media_factory.h" |
| 31 |
#include "igfxfmid.h" |
| 32 |
#include "mos_utilities.h" |
| 33 |
#include "mos_os.h" |
| 34 |
#include "mhw_vdbox_avp_interface.h" |
| 35 |
|
| 36 |
|
| 37 |
class MhwCpInterface; |
| 38 |
class MhwMiInterface; |
| 39 |
class MhwRenderInterface; |
| 40 |
class MhwSfcInterface; |
| 41 |
class XMHW_STATE_HEAP_INTERFACE; |
| 42 |
class MhwVeboxInterface; |
| 43 |
class MhwVeboxInterface; |
| 44 |
class MhwVdboxMfxInterface; |
| 45 |
class MhwVdboxHcpInterface; |
| 46 |
class MhwVdboxHucInterface; |
| 47 |
class MhwVdboxVdencInterface; |
| 48 |
class MhwBltInterface; |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
class MhwInterfaces |
| 55 |
{ |
| 56 |
public: |
| 57 |
virtual ~MhwInterfaces() {} |
| 58 |
|
| 59 |
|
| 60 |
struct CreateParams |
| 61 |
{ |
| 62 |
CreateParams() |
| 63 |
{ |
| 64 |
Flags.m_value = 0; |
| 65 |
} |
| 66 |
|
| 67 |
union |
| 68 |
{ |
| 69 |
struct |
| 70 |
{ |
| 71 |
uint32_t m_render : 1; |
| 72 |
uint32_t m_sfc : 1; |
| 73 |
uint32_t m_stateHeap : 1; |
| 74 |
uint32_t m_vebox : 1; |
| 75 |
uint32_t m_vdboxAll : 1; |
| 76 |
uint32_t m_mfx : 1; |
| 77 |
uint32_t m_hcp : 1; |
| 78 |
uint32_t m_huc : 1; |
| 79 |
uint32_t m_vdenc : 1; |
| 80 |
uint32_t m_blt : 1; |
| 81 |
uint32_t m_avp : 1; |
| 82 |
uint32_t m_reserved : 21; |
| 83 |
}; |
| 84 |
uint32_t m_value; |
| 85 |
} Flags; |
| 86 |
|
| 87 |
uint8_t m_heapMode = 0; |
| 88 |
bool m_isDecode = false; |
| 89 |
bool m_isCp = false; |
| 90 |
}; |
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
MhwCpInterface *m_cpInterface = nullptr; |
| 95 |
MhwMiInterface *m_miInterface = nullptr; |
| 96 |
MhwRenderInterface *m_renderInterface = nullptr; |
| 97 |
MhwSfcInterface *m_sfcInterface = nullptr; |
| 98 |
XMHW_STATE_HEAP_INTERFACE *m_stateHeapInterface = nullptr; |
| 99 |
MhwVeboxInterface *m_veboxInterface = nullptr; |
| 100 |
MhwVdboxMfxInterface *m_mfxInterface = nullptr; |
| 101 |
MhwVdboxHcpInterface *m_hcpInterface = nullptr; |
| 102 |
MhwVdboxHucInterface *m_hucInterface = nullptr; |
| 103 |
MhwVdboxVdencInterface *m_vdencInterface = nullptr; |
| 104 |
MhwBltInterface *m_bltInterface = nullptr; |
| 105 |
PMOS_INTERFACE m_osInterface = nullptr; |
| 106 |
MhwVdboxAvpInterface *m_avpInterface = nullptr; |
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
static MhwInterfaces* CreateFactory( |
| 118 |
CreateParams params, |
| 119 |
PMOS_INTERFACE osInterface); |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
virtual MOS_STATUS Initialize( |
| 130 |
CreateParams params, |
| 131 |
PMOS_INTERFACE osInterface) = 0; |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
virtual void Destroy(); |
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
void SetDestroyState(bool destorystate) { m_isDestroyed = destorystate; }; |
| 144 |
bool GetDestroyState() { return m_isDestroyed; }; |
| 145 |
|
| 146 |
private: |
| 147 |
bool m_isDestroyed = false; |
| 148 |
}; |
| 149 |
|
| 150 |
extern template class MediaFactory<uint32_t, MhwInterfaces>; |
| 151 |
|
| 152 |
#endif |