]> git.sesse.net Git - mlt/blob - src/modules/vid.stab/common.h
Added a fourth filter, that combines both detect and transform passes.
[mlt] / src / modules / vid.stab / common.h
1 /*
2  * common.h
3  *
4  *  Created on: 20 gru 2013
5  *      Author: Jakub Ksiezniak <j.ksiezniak@gmail.com>
6  */
7
8 #ifndef VIDSTAB_COMMON_H_
9 #define VIDSTAB_COMMON_H_
10
11 extern "C" {
12 #include <vid.stab/libvidstab.h>
13 #include <framework/mlt.h>
14 }
15
16 inline VSPixelFormat convertImageFormat(mlt_image_format &format) {
17         switch (format) {
18         case mlt_image_rgb24:
19                 return PF_RGB24;
20         case mlt_image_rgb24a:
21                 return PF_RGBA;
22         case mlt_image_yuv420p:
23                 return PF_YUV420P;
24         default:
25                 return PF_NONE;
26         }
27 }
28
29 int get_image_and_detect(mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable);
30 int get_image_and_transform(mlt_frame frame, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable);
31
32 #endif /* VIDSTAB_COMMON_H_ */