* dxva2api.h: Implemented missing inline functions:
		(DXVA2_Fixed32OpaqueAlpha): New.
		(DXVA2_Fixed32TransparentAlpha): New.
		(DXVA2FixedToFloat): New.
		(DXVA2FloatToFixed): New.

git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/branches/releases/v2_branch@4349 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/ChangeLog b/mingw-w64-headers/include/ChangeLog
index 0ab644b..e8ab440 100644
--- a/mingw-w64-headers/include/ChangeLog
+++ b/mingw-w64-headers/include/ChangeLog
@@ -1,5 +1,13 @@
 2011-08-08  Ozkan Sezer  <sezeroz@gmail.com>
 
+	* dxva2api.h: Implemented missing inline functions:
+	(DXVA2_Fixed32OpaqueAlpha): New.
+	(DXVA2_Fixed32TransparentAlpha): New.
+	(DXVA2FixedToFloat): New.
+	(DXVA2FloatToFixed): New.
+
+2011-08-08  Ozkan Sezer  <sezeroz@gmail.com>
+
 	* iscsidsc.h: Fixed many of the constants and data types.
 
 2011-08-07  Ozkan Sezer  <sezeroz@gmail.com>
diff --git a/mingw-w64-headers/include/dxva2api.h b/mingw-w64-headers/include/dxva2api.h
index 445ccda..0e51f10 100644
--- a/mingw-w64-headers/include/dxva2api.h
+++ b/mingw-w64-headers/include/dxva2api.h
@@ -550,11 +550,28 @@
 #define DXVA2_MotionVectorBuffer 7
 #define DXVA2_FilmGrainBuffer 8
 
-/*Fixme: inlines?*/
-const DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha(void);
-const DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha(void);
-float DXVA2FixedToFloat(const DXVA2_Fixed32 _fixed_);
-DXVA2_Fixed32 DXVA2FloatToFixed(const float _float_);
+__forceinline const DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha (void) {
+  DXVA2_Fixed32 f32;
+  f32.ll = 0 + (1 << 16);
+  return f32;
+}
+
+__forceinline const DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha (void) {
+  DXVA2_Fixed32 f32;
+  f32.ll = 0;
+  return f32;
+}
+
+__forceinline float DXVA2FixedToFloat (const DXVA2_Fixed32 f32) {
+  return (float)f32.Value + (float)f32.Fraction / (1 << 16);
+}
+
+__forceinline DXVA2_Fixed32 DXVA2FloatToFixed (const float f) {
+  DXVA2_Fixed32 f32;
+  f32.Value    = ((ULONG) (f * (1 << 16))) >> 16;
+  f32.Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;
+  return f32;
+}
 
 HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9(UINT *pResetToken,IDirect3DDeviceManager9 **ppDXVAManager);
 HRESULT WINAPI DXVA2CreateVideoService(IDirect3DDevice9 *pDD,REFIID riid,void **ppService);