1
0

codec_common_interface.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /****************************************************************************
  2. *
  3. * Module Title : codec_common_if.h
  4. *
  5. * Description : Common codec definitions.
  6. *
  7. ****************************************************************************/
  8. #ifndef __INC_CODEC_COMMON_INTERFACE_H
  9. #define __INC_CODEC_COMMON_INTERFACE_H
  10. /****************************************************************************
  11. * Macros
  12. ****************************************************************************/
  13. #define __export
  14. #define _export
  15. #define DllExport __declspec( dllexport )
  16. #define DllImport __declspec( dllimport )
  17. // Playback error codes
  18. #define NO_DECODER_ERROR 0
  19. #define REMOTE_DECODER_ERROR -1
  20. #define DFR_BAD_DCT_COEFF -100
  21. #define DFR_ZERO_LENGTH_FRAME -101
  22. #define DFR_FRAME_SIZE_INVALID -102
  23. #define DFR_OUTPUT_BUFFER_OVERFLOW -103
  24. #define DFR_INVALID_FRAME_HEADER -104
  25. #define FR_INVALID_MODE_TOKEN -110
  26. #define ETR_ALLOCATION_ERROR -200
  27. #define ETR_INVALID_ROOT_PTR -201
  28. #define SYNCH_ERROR -400
  29. #define BUFFER_UNDERFLOW_ERROR -500
  30. #define PB_IB_OVERFLOW_ERROR -501
  31. // External error triggers
  32. #define PB_HEADER_CHECKSUM_ERROR -601
  33. #define PB_DATA_CHECKSUM_ERROR -602
  34. // DCT Error Codes
  35. #define DDCT_EXPANSION_ERROR -700
  36. #define DDCT_INVALID_TOKEN_ERROR -701
  37. // ExceptionErrors
  38. #define GEN_EXCEPTIONS -800
  39. #define EX_UNQUAL_ERROR -801
  40. // Unrecoverable error codes
  41. #define FATAL_PLAYBACK_ERROR -1000
  42. #define GEN_ERROR_CREATING_CDC -1001
  43. #define GEN_THREAD_CREATION_ERROR -1002
  44. #define DFR_CREATE_BMP_FAILED -1003
  45. /****************************************************************************
  46. * Typedefs
  47. ****************************************************************************/
  48. typedef struct // YUV buffer configuration structure
  49. {
  50. int YWidth;
  51. int YHeight;
  52. int YStride;
  53. int UVWidth;
  54. int UVHeight;
  55. int UVStride;
  56. char *YBuffer;
  57. char *UBuffer;
  58. char *VBuffer;
  59. } YUV_BUFFER_CONFIG;
  60. typedef enum
  61. {
  62. C_SET_KEY_FRAME,
  63. C_SET_FIXED_Q,
  64. C_SET_FIRSTPASS_FILE,
  65. C_SET_EXPERIMENTAL_MIN,
  66. C_SET_EXPERIMENTAL_MAX = C_SET_EXPERIMENTAL_MIN + 255,
  67. C_SET_CHECKPROTECT,
  68. C_SET_TESTMODE,
  69. C_SET_INTERNAL_SIZE,
  70. C_SET_RECOVERY_FRAME,
  71. C_SET_REFERENCEFRAME,
  72. C_SET_GOLDENFRAME
  73. } C_SETTING;
  74. typedef enum
  75. {
  76. MAINTAIN_ASPECT_RATIO = 0x0,
  77. SCALE_TO_FIT = 0x1,
  78. CENTER = 0x2,
  79. OTHER = 0x3
  80. } SCALE_MODE;
  81. #endif