xplatform_image.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //*@@@+++@@@@******************************************************************
  2. //
  3. // Copyright © Microsoft Corp.
  4. // All rights reserved.
  5. //
  6. // Redistribution and use in source and binary forms, with or without
  7. // modification, are permitted provided that the following conditions are met:
  8. //
  9. // • Redistributions of source code must retain the above copyright notice,
  10. // this list of conditions and the following disclaimer.
  11. // • Redistributions in binary form must reproduce the above copyright notice,
  12. // this list of conditions and the following disclaimer in the documentation
  13. // and/or other materials provided with the distribution.
  14. //
  15. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  16. // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  18. // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  19. // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  20. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  21. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  22. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  23. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  24. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  25. // POSSIBILITY OF SUCH DAMAGE.
  26. //
  27. //*@@@---@@@@******************************************************************
  28. #ifndef XPLATFORM_IMAGE_H
  29. #define XPLATFORM_IMAGE_H
  30. #ifdef __ANSI__
  31. // ANSI
  32. #define FORCE_INLINE
  33. #define CDECL
  34. #define UINTPTR_T unsigned int
  35. #define INTPTR_T int
  36. #define DECLSPEC_ALIGN(bytes)
  37. #endif // __ANSI__
  38. //#if defined(WIN32)
  39. #if defined(WIN32) && !defined(UNDER_CE) // WIN32 seems to be defined always in VS2005 for ARM platform
  40. // x86
  41. //#define CDECL __cdecl
  42. #define DECLSPEC_ALIGN(bytes) __declspec(align(bytes))
  43. #endif // x86
  44. #if defined(_ARM_) || defined(UNDER_CE)
  45. // ARM, WinCE
  46. #define FORCE_INLINE inline
  47. #define CDECL
  48. #define UINTPTR_T unsigned int
  49. #define INTPTR_T int
  50. #define DECLSPEC_ALIGN(bytes)
  51. // parser
  52. #define FULL_PATH_CONFIG_FILE_ENCODE "\\ConfigFile_encode.txt"
  53. #define FULL_PATH_CONFIG_FILE_DECODE "\\ConfigFile_decode.txt"
  54. #define MAX_ARGC 14
  55. #define MaxCharReadCount 10
  56. #define MAX_FNAME 256
  57. #define DELIMITER "filelist:"
  58. #define CODEC_ENCODE "encode"
  59. #define CODEC_DECODE "decode"
  60. #define PHOTON "ptn"
  61. #define OUTRAW "raw"
  62. #define OUTBMP "bmp"
  63. #define OUTPPM "ppm"
  64. #define OUTTIF "tif"
  65. #define OUTHDR "hdr"
  66. #define OUTIYUV "iyuv"
  67. #define OUTYUV422 "yuv422"
  68. #define OUTYUV444 "yuv444"
  69. int XPLATparser(char *pcARGV[], char *pcCodec);
  70. void freeXPLATparser(int iARGC, char *pcARGV[]);
  71. // WinCE intrinsic
  72. #include <Cmnintrin.h>
  73. #endif // ARM, WinCE
  74. #endif // XPLATFORM_IMAGE_H