WinGui: Fix another instance of the Caliburn vs Json.net sillyness where objects...
[HandBrake.git] / libhb / dxva2api.c
blob9cfd8094fd77f5a6a993b4b245904196c1087709
1 /* dxva2api.c
3 Copyright (c) 2003-2015 HandBrake Team
4 This file is part of the HandBrake source code
5 Homepage: <http://handbrake.fr/>.
6 It may be used under the terms of the GNU General Public License v2.
7 For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
9 Authors: Peng Gao <peng@multicorewareinc.com> <http://www.multicorewareinc.com/>
10 Li Cao <li@multicorewareinc.com> <http://www.multicorewareinc.com/>
13 #ifdef USE_HWD
14 #include "dxva2api.h"
16 __inline float hb_dx_fixedtofloat( const DXVA2_Fixed32 _fixed_ )
18 return (FLOAT)_fixed_.Value + (FLOAT)_fixed_.Fraction / 0x10000;
21 __inline const DXVA2_Fixed32 hb_dx_fixed32_opaque_alpha()
23 DXVA2_Fixed32 _fixed_;
24 _fixed_.Fraction = 0;
25 _fixed_.Value = 0;
26 _fixed_.ll = 1;
27 return _fixed_;
31 __inline DXVA2_Fixed32 hb_dx_floattofixed( const float _float_ )
33 DXVA2_Fixed32 _fixed_;
34 _fixed_.Fraction = LOWORD( _float_ * 0x10000 );
35 _fixed_.Value = HIWORD( _float_ * 0x10000 );
36 return _fixed_;
38 #endif