config.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * Copyright (c) 2019, Chips&Media
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. *
  8. * 1. Redistributions of source code must retain the above copyright notice, this
  9. * list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright notice,
  11. * this list of conditions and the following disclaimer in the documentation
  12. * and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  15. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  16. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  17. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
  18. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  19. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  20. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  21. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  23. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. #ifndef __CONFIG_H__
  26. #define __CONFIG_H__
  27. #if defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WIN32) || defined(__MINGW32__)
  28. # define PLATFORM_WIN32
  29. #elif defined(linux) || defined(__linux) || defined(ANDROID)
  30. # define PLATFORM_LINUX
  31. # define RISCV64
  32. #elif defined(unix) || defined(__unix)
  33. # define PLATFORM_QNX
  34. #else
  35. # define PLATFORM_NON_OS
  36. #endif
  37. #if defined(_MSC_VER)
  38. # include <windows.h>
  39. # define inline _inline
  40. #elif defined(__GNUC__)
  41. #elif defined(__ARMCC__)
  42. #else
  43. # error "Unknown compiler."
  44. #endif
  45. #define API_VERSION_MAJOR 5
  46. #define API_VERSION_MINOR 5
  47. #define API_VERSION_PATCH 60
  48. #define API_VERSION ((API_VERSION_MAJOR<<16) | (API_VERSION_MINOR<<8) | API_VERSION_PATCH)
  49. #if defined(PLATFORM_NON_OS) || defined (ANDROID) || defined(MFHMFT_EXPORTS) || defined(PLATFORM_QNX) || defined(CNM_SIM_PLATFORM) || defined(RISCV64)
  50. //#define SUPPORT_FFMPEG_DEMUX
  51. #else
  52. #define SUPPORT_FFMPEG_DEMUX
  53. #endif
  54. //------------------------------------------------------------------------------
  55. // COMMON
  56. //------------------------------------------------------------------------------
  57. #if defined(linux) || defined(__linux) || defined(ANDROID) || defined(CNM_FPGA_HAPS_INTERFACE)
  58. #define SUPPORT_MULTI_INST_INTR
  59. #endif
  60. // do not define BIT_CODE_FILE_PATH in case of multiple product support. because wave410 and coda980 has different firmware binary format.
  61. #define CORE_0_BIT_CODE_FILE_PATH "coda960.out" // for coda960
  62. #define CORE_1_BIT_CODE_FILE_PATH "coda980.out" // for coda980
  63. #define CORE_2_BIT_CODE_FILE_PATH "picasso.bin" // for wave510
  64. #define CORE_4_BIT_CODE_FILE_PATH "millet.bin" // for wave520
  65. #define CORE_5_BIT_CODE_FILE_PATH "kepler.bin" // for wave515
  66. #define CORE_6_BIT_CODE_FILE_PATH "chagall.bin" // for wave521
  67. #define CORE_7_BIT_CODE_FILE_PATH "vincent.bin" // for wave517
  68. //------------------------------------------------------------------------------
  69. // OMX
  70. //------------------------------------------------------------------------------
  71. //------------------------------------------------------------------------------
  72. // WAVE521C
  73. //------------------------------------------------------------------------------
  74. //#define SUPPORT_LOOK_AHEAD_RC
  75. //------------------------------------------------------------------------------
  76. // WAVE511
  77. //------------------------------------------------------------------------------
  78. //------------------------------------------------------------------------------
  79. // WAVE517
  80. //------------------------------------------------------------------------------
  81. //#define SUPPORT_SW_UART
  82. //#define SUPPORT_SW_UART_V2 // WAVE511 or WAVE521C
  83. #endif /* __CONFIG_H__ */