]> git.sesse.net Git - mlt/blobdiff - src/modules/vid.stab/common.h
Created a new module to support vid.stab library.
[mlt] / src / modules / vid.stab / common.h
diff --git a/src/modules/vid.stab/common.h b/src/modules/vid.stab/common.h
new file mode 100644 (file)
index 0000000..b373dbd
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * common.h
+ *
+ *  Created on: 20 gru 2013
+ *      Author: Jakub Ksiezniak <j.ksiezniak@gmail.com>
+ */
+
+#ifndef VIDSTAB_COMMON_H_
+#define VIDSTAB_COMMON_H_
+
+extern "C" {
+#include <vid.stab/libvidstab.h>
+#include <framework/mlt.h>
+}
+
+inline VSPixelFormat convertImageFormat(mlt_image_format &format) {
+       switch (format) {
+       case mlt_image_rgb24:
+               return PF_RGB24;
+       case mlt_image_rgb24a:
+               return PF_RGBA;
+       case mlt_image_yuv420p:
+               return PF_YUV420P;
+       default:
+               return PF_NONE;
+       }
+}
+
+#endif /* VIDSTAB_COMMON_H_ */