encdebug.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. --
  16. -- Abstract : Utility macros for debugging and tracing
  17. --
  18. ------------------------------------------------------------------------------*/
  19. #ifndef __ENCDEBUG_H__
  20. #define __ENCDEBUG_H__
  21. /* macro for assertion, used only when _ASSERT_USED is defined */
  22. #ifdef _ASSERT_USED
  23. #ifndef ASSERT
  24. #include <assert.h>
  25. #define ASSERT(expr) assert(expr)
  26. #endif
  27. #else
  28. #define ASSERT(expr)
  29. #endif
  30. /* macro for debug printing, used only when _DEBUG_PRINT is defined */
  31. #ifdef _DEBUG_PRINT
  32. #include <stdio.h>
  33. #define DEBUG_PRINT(args) printf args
  34. #else
  35. #define DEBUG_PRINT(args)
  36. #endif
  37. #ifdef TRACE_STREAM
  38. #include "enctracestream.h"
  39. #define COMMENT(x) EncComment(x)
  40. #define COMMENTMBTYPE(x,y) EncCommentMbType(x, y)
  41. #define TRACE_BIT_STREAM(v,n) EncTraceStream(v, n)
  42. #else
  43. #define COMMENT(x)
  44. #define COMMENTMBTYPE(x,y)
  45. #define TRACE_BIT_STREAM(v,n)
  46. #endif
  47. #endif /* __ENCDEBUG_H__ */