summaryrefslogtreecommitdiff
path: root/code/test/vid/tools.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2017-08-22 05:46:13 +0200
committerUros Majstorovic <majstor@majstor.org>2017-08-22 05:46:13 +0200
commita3f0e09379759e4cfb79e1d5c7d7ac752728fe5f (patch)
treefeba5d13801c8054016e4549ef97fba50e9d8461 /code/test/vid/tools.h
parent680922c97ca94e832e75b20f5aa22a00a6a80420 (diff)
added video test
Diffstat (limited to 'code/test/vid/tools.h')
-rw-r--r--code/test/vid/tools.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/code/test/vid/tools.h b/code/test/vid/tools.h
new file mode 100644
index 0000000..0bbf512
--- /dev/null
+++ b/code/test/vid/tools.h
@@ -0,0 +1,29 @@
+#ifndef TOOLS_COMMON_H_
+#define TOOLS_COMMON_H_
+
+#include "vpx/vpx_codec.h"
+#include "vpx/vpx_image.h"
+#include "vpx/vp8cx.h"
+
+#define VP8_FOURCC 0x30385056
+#define VP9_FOURCC 0x30395056
+
+struct VpxRational {
+ int numerator;
+ int denominator;
+};
+
+typedef struct VpxInterface {
+ const char *const name;
+ const uint32_t fourcc;
+ vpx_codec_iface_t *(*const codec_interface)();
+} VpxInterface;
+
+void usage_exit(void);
+const VpxInterface *get_vpx_encoder_by_index(int i);
+const VpxInterface *get_vpx_encoder_by_name(const char *name);
+
+void die(const char *fmt, ...);
+void die_codec(vpx_codec_ctx_t *ctx, const char *s);
+
+#endif \ No newline at end of file