| 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 |
|
| 28 |
|
| 29 |
#ifndef __VP_FEATURE_MANAGER_H__ |
| 30 |
#define __VP_FEATURE_MANAGER_H__ |
| 31 |
|
| 32 |
#include "media_feature_manager.h" |
| 33 |
#include "vp_utils.h" |
| 34 |
#include "vp_pipeline_common.h" |
| 35 |
#include "vp_allocator.h" |
| 36 |
#include "vp_obj_factories.h" |
| 37 |
#include "vp_user_feature_control.h" |
| 38 |
|
| 39 |
namespace vp |
| 40 |
{ |
| 41 |
class SwFilterFeatureHandler; |
| 42 |
class VpResourceManager; |
| 43 |
|
| 44 |
class VPFeatureManager : public MediaFeatureManager |
| 45 |
{ |
| 46 |
public: |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
VPFeatureManager(PVP_MHWINTERFACE hwInterface); |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
virtual ~VPFeatureManager() {} |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
virtual MOS_STATUS CheckFeatures(void *params, bool &bapgFuncSupported); |
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
virtual MOS_STATUS CheckFeatures(void *params); |
| 78 |
|
| 79 |
protected: |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
virtual bool IsHdrNeeded( |
| 90 |
PVPHAL_SURFACE pSrc, |
| 91 |
PVPHAL_SURFACE pRenderTarget); |
| 92 |
|
| 93 |
virtual bool IsCroppingNeeded(PVPHAL_SURFACE pSrc); |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
virtual bool Is2PassesCSCNeeded( |
| 104 |
PVPHAL_SURFACE pSrc, |
| 105 |
PVPHAL_SURFACE pRenderTarget); |
| 106 |
|
| 107 |
virtual bool IsVeboxOutFeasible(PVP_PIPELINE_PARAMS params); |
| 108 |
|
| 109 |
virtual bool IsVeboxInputFormatSupport(PVPHAL_SURFACE pSrcSurface); |
| 110 |
|
| 111 |
virtual bool IsVeboxRTFormatSupport( |
| 112 |
PVPHAL_SURFACE pSrcSurface, |
| 113 |
PVPHAL_SURFACE pRTSurface); |
| 114 |
|
| 115 |
virtual bool IsVeboxSupported(PVP_PIPELINE_PARAMS params); |
| 116 |
|
| 117 |
virtual bool IsSfcOutputFeasible(PVP_PIPELINE_PARAMS params); |
| 118 |
|
| 119 |
virtual bool IsOutputFormatSupported( |
| 120 |
PVPHAL_SURFACE outSurface); |
| 121 |
|
| 122 |
virtual bool IsRGBOutputFormatSupported( |
| 123 |
PVPHAL_SURFACE outSurface); |
| 124 |
|
| 125 |
virtual bool IsNV12P010OutputFormatSupported( |
| 126 |
PVPHAL_SURFACE outSurface); |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
virtual void GetAlignUnit( |
| 141 |
uint16_t &wWidthAlignUnit, |
| 142 |
uint16_t &wHeightAlignUnit, |
| 143 |
MOS_FORMAT format); |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
virtual MOS_STATUS RectSurfaceAlignment( |
| 156 |
PVPHAL_SURFACE pSurface, |
| 157 |
MOS_FORMAT formatForDstRect); |
| 158 |
|
| 159 |
virtual bool IsSfcInterlacedScalingSupported() |
| 160 |
{ |
| 161 |
return false; |
| 162 |
} |
| 163 |
|
| 164 |
virtual bool IsDiFormatSupported(MOS_FORMAT format); |
| 165 |
virtual bool IsVeboxSurfaceHeightAligned(VPHAL_SURFACE &surf); |
| 166 |
|
| 167 |
protected: |
| 168 |
PVP_MHWINTERFACE m_hwInterface = nullptr; |
| 169 |
PMOS_INTERFACE m_pOsInterface = nullptr; |
| 170 |
vp::VpUserFeatureControl *m_vpUserFeatureControl = nullptr; |
| 171 |
|
| 172 |
MEDIA_CLASS_DEFINE_END(vp__VPFeatureManager) |
| 173 |
}; |
| 174 |
|
| 175 |
class VpFeatureManagerNext : public MediaFeatureManager |
| 176 |
{ |
| 177 |
public: |
| 178 |
VpFeatureManagerNext(VpInterface& vpInterface); |
| 179 |
virtual ~VpFeatureManagerNext(); |
| 180 |
|
| 181 |
virtual MOS_STATUS Init(void* settings) override; |
| 182 |
virtual MOS_STATUS InitPacketPipe(SwFilterPipe& swFilterPipe, |
| 183 |
PacketPipe& packetPipe); |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
bool IsVeboxSfcFormatSupported(MOS_FORMAT formatInput, MOS_FORMAT formatOutput); |
| 196 |
|
| 197 |
Policy *GetPolicy() |
| 198 |
{ |
| 199 |
return m_policy; |
| 200 |
} |
| 201 |
|
| 202 |
protected: |
| 203 |
MOS_STATUS CreateHwFilterPipe(SwFilterPipe& swFilterPipe, HwFilterPipe*& pHwFilterPipe); |
| 204 |
MOS_STATUS UpdateResources(HwFilterPipe& hwFilterPipe); |
| 205 |
|
| 206 |
virtual MOS_STATUS RegisterFeatures(); |
| 207 |
MOS_STATUS UnregisterFeatures(); |
| 208 |
|
| 209 |
VpInterface &m_vpInterface; |
| 210 |
Policy *m_policy = nullptr; |
| 211 |
std::map<FeatureType, SwFilterFeatureHandler*> m_featureHandler; |
| 212 |
uint32_t m_isFeatureRegistered = false; |
| 213 |
|
| 214 |
MEDIA_CLASS_DEFINE_END(vp__VpFeatureManagerNext) |
| 215 |
}; |
| 216 |
} |
| 217 |
#endif |