1
0

vp50_comp_interface.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. #if !defined(VP50_COMP_INTERFACE_H)
  2. #define VP50_COMP_INTERFACE_H
  3. /****************************************************************************
  4. *
  5. * Module Title : VFW_COMP_INTERFACE.H
  6. *
  7. * Description : Interface to video codec demo compressor DLL
  8. *
  9. * AUTHOR : Paul Wilkins
  10. *
  11. *****************************************************************************
  12. * Revision History
  13. *
  14. * 1.04 JBB 26 AUG 00 JBB Added fixed q setting
  15. * 1.03 PGW 07/12/99 Retro fit JBB changes
  16. * 1.02 PGW 16/09/99 Interface changes to simplify things for command line
  17. * compressor.
  18. * 1.01 PGW 07/07/99 Added COMP_CONFIG.
  19. * 1.00 PGW 28/06/99 New configuration baseline
  20. *
  21. *****************************************************************************
  22. */
  23. // C4514 Unreferenced inline function has been removed
  24. #ifndef MACPPC
  25. #pragma warning(disable: 4514)
  26. #endif
  27. #include "codec_common_interface.h"
  28. #include "type_aliases.h"
  29. /* Command interface to compressor. */
  30. /* Settings Control */
  31. typedef struct
  32. {
  33. UINT32 FrameSize;
  34. UINT32 TargetBitRate;
  35. UINT32 FrameRate;
  36. UINT32 KeyFrameFrequency;
  37. UINT32 KeyFrameDataTarget;
  38. UINT32 Quality;
  39. BOOL AllowDF;
  40. BOOL QuickCompress;
  41. BOOL AutoKeyFrameEnabled;
  42. INT32 AutoKeyFrameThreshold;
  43. UINT32 MinimumDistanceToKeyFrame;
  44. INT32 ForceKeyFrameEvery;
  45. INT32 NoiseSensitivity;
  46. BOOL AllowSpatialResampling;
  47. // The Intended Horizontal Scale
  48. UINT32 HScale;
  49. UINT32 HRatio;
  50. // The Intended Vertical Scale
  51. UINT32 VScale;
  52. UINT32 VRatio;
  53. // The way in which we intended
  54. UINT32 ScalingMode;
  55. // Interlaced (0) means no (1) means Yes
  56. UINT32 Interlaced;
  57. BOOL FixedQ;
  58. INT32 StartingBufferLevel; // The initial encoder buffer level
  59. INT32 OptimalBufferLevel; // The buffer level target we strive to reach / maintain.
  60. INT32 DropFramesWaterMark; // Buffer fullness watermark for forced drop frames.
  61. INT32 ResampleDownWaterMark; // Buffer fullness watermark for downwards spacial re-sampling
  62. INT32 ResampleUpWaterMark; // Buffer fullness watermark where returning to larger image size is consdered
  63. INT32 OutputFrameRate;
  64. INT32 Speed;
  65. BOOL ErrorResilientMode; // compress using a mode that won't completely fall apart if we decompress using
  66. // the frame after a dropped frame
  67. } COMP_CONFIG_VP5;
  68. INLINE
  69. void comp_config_default_vp5(COMP_CONFIG_VP5* pcc)
  70. {
  71. pcc->FrameSize = 0; // No default value
  72. pcc->TargetBitRate = 300;
  73. pcc->FrameRate = 0; // No default value
  74. pcc->KeyFrameFrequency = 120;
  75. pcc->KeyFrameDataTarget = 0; // No default value
  76. pcc->Quality = 56;
  77. pcc->AllowDF = 0;
  78. pcc->QuickCompress = 1;
  79. pcc->AutoKeyFrameEnabled = 1;
  80. pcc->AutoKeyFrameThreshold = 80;
  81. pcc->MinimumDistanceToKeyFrame = 8;
  82. pcc->ForceKeyFrameEvery = 120;
  83. pcc->NoiseSensitivity = 0;
  84. pcc->AllowSpatialResampling = 0;
  85. pcc->HScale = 1;
  86. pcc->HRatio = 1;
  87. pcc->VScale = 1;
  88. pcc->VRatio = 1;
  89. pcc->ScalingMode = MAINTAIN_ASPECT_RATIO;
  90. pcc->Interlaced = 0;
  91. pcc->FixedQ = 0;
  92. pcc->StartingBufferLevel = 6;
  93. pcc->OptimalBufferLevel = 10;
  94. pcc->DropFramesWaterMark = 20;
  95. pcc->ResampleDownWaterMark = 35;
  96. pcc->ResampleUpWaterMark = 45;
  97. pcc->OutputFrameRate = 30;
  98. pcc->Speed = 12;
  99. pcc->ErrorResilientMode = FALSE;
  100. return;
  101. }
  102. #ifndef YUVINPUTBUFFERCONFIG
  103. #define YUVINPUTBUFFERCONFIG
  104. typedef struct
  105. {
  106. int YWidth;
  107. int YHeight;
  108. int YStride;
  109. int UVWidth;
  110. int UVHeight;
  111. int UVStride;
  112. char * YBuffer;
  113. char * UBuffer;
  114. char * VBuffer;
  115. } YUV_INPUT_BUFFER_CONFIG;
  116. #endif
  117. #endif