Advertisement
Guest User

libfaad_VC++2013.diff

a guest
Feb 6th, 2014
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. --- faad2-2.7/libfaad/common.h.orig
  2. +++ faad2-2.7/libfaad/common.h
  3. @@ -168,6 +168,11 @@
  4.  
  5. #if defined(_WIN32) && !defined(__MINGW32__)
  6.  
  7. + #if _MSC_VER >= 1800
  8. + /* Use lrintf() function of Standard VC++ library on VC++2013 and later */
  9. + #define HAVE_LRINTF
  10. + #endif
  11. +
  12. #include <stdlib.h>
  13.  
  14. typedef unsigned __int64 uint64_t;
  15. @@ -314,17 +319,17 @@
  16.  
  17.  
  18. #if defined(_WIN32) && !defined(__MINGW32__)
  19. + #ifndef HAVE_LRINTF
  20. #define HAS_LRINTF
  21. - static INLINE int lrintf(float f)
  22. - {
  23. - int i;
  24. - __asm
  25. - {
  26. - fld f
  27. - fistp i
  28. - }
  29. - return i;
  30. - }
  31. + // Use SSE2 Intrinsic (Require SSE2 Capable Processor)
  32. + #include <emmintrin.h>
  33. + static INLINE int32_t lrintf(double f)
  34. + // double is not a mistake, this trick is for fast conversion.
  35. + {
  36. + return _mm_cvtsd_si32(_mm_set_sd( f ));
  37. + }
  38. + #endif /* HAVE_LRINTF */
  39. +
  40. #elif (defined(__i386__) && defined(__GNUC__) && \
  41. !defined(__CYGWIN__) && !defined(__MINGW32__))
  42. #ifndef HAVE_LRINTF
  43. --- faad2-2.7/libfaad/libfaad2.def.orig
  44. +++ faad2-2.7/libfaad/libfaad2.def
  45. @@ -12,3 +12,5 @@
  46. NeAACDecClose @7
  47. NeAACDecGetErrorMessage @8
  48. NeAACDecAudioSpecificConfig @9
  49. +NeAACDecPostSeekReset @10
  50. +NeAACDecDecode2 @11
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement