vputypes.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /* SPDX-License-Identifier: LGPL-2.1 OR BSD-3-Clause */
  2. //--=========================================================================--
  3. // This file is a part of VPU Reference API project
  4. //-----------------------------------------------------------------------------
  5. //
  6. // This confidential and proprietary software may be used only
  7. // as authorized by a licensing agreement from Chips&Media Inc.
  8. // In the event of publication, the following notice is applicable:
  9. //
  10. // (C) COPYRIGHT 2006 - 2013 CHIPS&MEDIA INC.
  11. // ALL RIGHTS RESERVED
  12. //
  13. // The entire notice above must be reproduced on all authorized
  14. // copies.
  15. //
  16. //--=========================================================================--
  17. #ifndef _VPU_TYPES_H_
  18. #define _VPU_TYPES_H_
  19. #include <stdint.h>
  20. /**
  21. * @brief This type is an 8-bit unsigned integral type, which is used for declaring pixel data.
  22. */
  23. typedef uint8_t Uint8;
  24. /**
  25. * @brief This type is a 32-bit unsigned integral type, which is used for declaring variables with wide ranges and no signs such as size of buffer.
  26. */
  27. typedef uint32_t Uint32;
  28. /**
  29. * @brief This type is a 16-bit unsigned integral type.
  30. */
  31. typedef uint16_t Uint16;
  32. /**
  33. * @brief This type is an 8-bit signed integral type.
  34. */
  35. typedef int8_t Int8;
  36. /**
  37. * @brief This type is a 32-bit signed integral type.
  38. */
  39. typedef int32_t Int32;
  40. /**
  41. * @brief This type is a 16-bit signed integral type.
  42. */
  43. typedef int16_t Int16;
  44. #if defined(_MSC_VER)
  45. typedef unsigned __int64 Uint64;
  46. typedef __int64 Int64;
  47. #else
  48. typedef uint64_t Uint64;
  49. typedef int64_t Int64;
  50. #endif
  51. #ifndef PhysicalAddress
  52. /**
  53. * @brief This is a type for representing physical addresses which are recognizable by VPU.
  54. In general, VPU hardware does not know about virtual address space
  55. which is set and handled by host processor. All these virtual addresses are
  56. translated into physical addresses by Memory Management Unit.
  57. All data buffer addresses such as stream buffer and frame buffer should be given to
  58. VPU as an address on physical address space.
  59. */
  60. typedef Uint32 PhysicalAddress;
  61. #endif
  62. #ifndef BYTE
  63. /**
  64. * @brief This type is an 8-bit unsigned integral type.
  65. */
  66. typedef unsigned char BYTE;
  67. #endif
  68. #ifndef BOOL
  69. typedef int BOOL;
  70. #endif
  71. #ifndef TRUE
  72. #define TRUE 1
  73. #endif /* TRUE */
  74. #ifndef FALSE
  75. #define FALSE 0
  76. #endif /* FALSE */
  77. #ifndef NULL
  78. #define NULL 0
  79. #endif
  80. #ifndef UNREFERENCED_PARAMETER
  81. #define UNREFERENCED_PARAMETER(P) \
  82. /*lint -save -e527 -e530 */ \
  83. { \
  84. (P) = (P); \
  85. } \
  86. /*lint -restore */
  87. #endif
  88. #ifdef __GNUC__
  89. #define UNREFERENCED_FUNCTION __attribute__ ((unused))
  90. #else
  91. #define UNREFERENCED_FUNCTION
  92. #endif
  93. #endif /* _VPU_TYPES_H_ */