00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifndef AVFILTER_TRANSFORM_H
00023 #define AVFILTER_TRANSFORM_H
00024 
00025 #include <stdint.h>
00026 
00039 enum InterpolateMethod {
00040     INTERPOLATE_NEAREST,        
00041     INTERPOLATE_BILINEAR,       
00042     INTERPOLATE_BIQUADRATIC,    
00043     INTERPOLATE_COUNT,          
00044 };
00045 
00046 
00047 #define INTERPOLATE_DEFAULT INTERPOLATE_BILINEAR
00048 #define INTERPOLATE_FAST    INTERPOLATE_NEAREST
00049 #define INTERPOLATE_BEST    INTERPOLATE_BIQUADRATIC
00050 
00051 enum FillMethod {
00052     FILL_BLANK,         
00053     FILL_ORIGINAL,      
00054     FILL_CLAMP,         
00055     FILL_MIRROR,        
00056     FILL_COUNT,         
00057 };
00058 
00059 
00060 #define FILL_DEFAULT FILL_ORIGINAL
00061 
00076 void avfilter_get_matrix(float x_shift, float y_shift, float angle, float zoom, float *matrix);
00077 
00085 void avfilter_add_matrix(const float *m1, const float *m2, float *result);
00086 
00094 void avfilter_sub_matrix(const float *m1, const float *m2, float *result);
00095 
00103 void avfilter_mul_matrix(const float *m1, float scalar, float *result);
00104 
00120 void avfilter_transform(const uint8_t *src, uint8_t *dst,
00121                         int src_stride, int dst_stride,
00122                         int width, int height, const float *matrix,
00123                         enum InterpolateMethod interpolate,
00124                         enum FillMethod fill);
00125 
00126 #endif