summaryrefslogtreecommitdiff
path: root/video/webm_common.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /video/webm_common.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'video/webm_common.h')
-rw-r--r--video/webm_common.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/video/webm_common.h b/video/webm_common.h
new file mode 100644
index 0000000..cd52070
--- /dev/null
+++ b/video/webm_common.h
@@ -0,0 +1,48 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// File: webm_common.h
+//
+// WebM limits and constants shared among all QuickTime functions
+//
+//=============================================================================
+
+
+#ifndef WEBM_COMMON_H
+#define WEBM_COMMON_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+// constant that define the bounds of various inputs
+static const int cMinVideoFrameWidth = 16;
+static const int cMinVideoFrameHeight = 16;
+static const int cMaxVideoFrameWidth = 2 * 2048;
+static const int cMaxVideoFrameHeight = 2 * 2048;
+
+static const int cMinFPS = 1;
+static const int cMaxFPS = 600;
+
+static const float cMinDuration = 0.016666666f; // 1/60th second
+static const float cMaxDuration = 3600.0f; // 1 Hour
+
+static const int cMinSampleRate = 11025; // 1/4 CD sample rate
+static const int cMaxSampleRate = 88200; // 2x CD rate
+
+
+//-----------------------------------------------------------------------------
+// Computes a power of two at least as big as the passed-in number
+//-----------------------------------------------------------------------------
+static inline int ComputeGreaterPowerOfTwo( int n )
+{
+ int i = 1;
+ while ( i < n )
+ {
+ i <<= 1;
+ }
+ return i;
+}
+
+
+#endif // WEBM_COMMON_H