]> git.sesse.net Git - mlt/blobdiff - src/modules/vid.stab/common.h
Add support for more image formats to vid.stab
[mlt] / src / modules / vid.stab / common.h
index c9a060bf6bd4707946c7c19c5b504a8547daa7c9..de081f437162fcd77b5690898bb2da3056d93fcb 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * common.h
  * Copyright (C) 2013 Jakub Ksiezniak <j.ksiezniak@gmail.com>
+ * Copyright (C) 2014 Brian Matherly <pez4brian@yahoo.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #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;
-       }
-}
+mlt_image_format validate_format( mlt_image_format format );
+VSPixelFormat mltimage_to_vsimage( mlt_image_format mlt_format, int width, int height, uint8_t* mlt_img, uint8_t** vs_img );
+void vsimage_to_mltimage( uint8_t* vs_img, uint8_t* mlt_img, mlt_image_format mlt_format, int width, int height );
+void free_vsimage( uint8_t* vs_img, VSPixelFormat format );
 
 #endif /* VIDSTAB_COMMON_H_ */