#endif
}
+#include "utils/CPUInfo.h"
+
+inline int PPCPUFlags()
+{
+ unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures();
+ int flags = 0;
+
+ if (cpuFeatures & CPU_FEATURE_MMX)
+ flags |= PP_CPU_CAPS_MMX;
+ if (cpuFeatures & CPU_FEATURE_MMX2)
+ flags |= PP_CPU_CAPS_MMX2;
+ if (cpuFeatures & CPU_FEATURE_3DNOW)
+ flags |= PP_CPU_CAPS_3DNOW;
+ if (cpuFeatures & CPU_FEATURE_ALTIVEC)
+ flags |= PP_CPU_CAPS_ALTIVEC;
+
+ return flags;
+}
+
class DllPostProcInterface
{
public:
Dispose();
}
- m_pContext = m_dll.pp_get_context(m_pSource->iWidth, m_pSource->iHeight, PP_CPU_CAPS_MMX | PP_CPU_CAPS_MMX2 | PP_FORMAT_420);
+ m_pContext = m_dll.pp_get_context(m_pSource->iWidth, m_pSource->iHeight, PPCPUFlags() | PP_FORMAT_420);
m_iInitWidth = m_pSource->iWidth;
m_iInitHeight = m_pSource->iHeight;