Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // File: webm_common.h
  4. //
  5. // WebM limits and constants shared among all QuickTime functions
  6. //
  7. //=============================================================================
  8. #ifndef WEBM_COMMON_H
  9. #define WEBM_COMMON_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. // constant that define the bounds of various inputs
  14. static const int cMinVideoFrameWidth = 16;
  15. static const int cMinVideoFrameHeight = 16;
  16. static const int cMaxVideoFrameWidth = 2 * 2048;
  17. static const int cMaxVideoFrameHeight = 2 * 2048;
  18. static const int cMinFPS = 1;
  19. static const int cMaxFPS = 600;
  20. static const float cMinDuration = 0.016666666f; // 1/60th second
  21. static const float cMaxDuration = 3600.0f; // 1 Hour
  22. static const int cMinSampleRate = 11025; // 1/4 CD sample rate
  23. static const int cMaxSampleRate = 88200; // 2x CD rate
  24. //-----------------------------------------------------------------------------
  25. // Computes a power of two at least as big as the passed-in number
  26. //-----------------------------------------------------------------------------
  27. static inline int ComputeGreaterPowerOfTwo( int n )
  28. {
  29. int i = 1;
  30. while ( i < n )
  31. {
  32. i <<= 1;
  33. }
  34. return i;
  35. }
  36. #endif // WEBM_COMMON_H