• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavfilter/transform.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010 Georg Martius <georg.martius@web.de>
00003  * Copyright (C) 2010 Daniel G. Taylor <dan@programmer-art.org>
00004  *
00005  * This file is part of FFmpeg.
00006  *
00007  * FFmpeg is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * FFmpeg is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with FFmpeg; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00022 #ifndef AVFILTER_TRANSFORM_H
00023 #define AVFILTER_TRANSFORM_H
00024 
00037 enum InterpolateMethod {
00038     INTERPOLATE_NEAREST,        //< Nearest-neighbor (fast)
00039     INTERPOLATE_BILINEAR,       //< Bilinear
00040     INTERPOLATE_BIQUADRATIC,    //< Biquadratic (best)
00041     INTERPOLATE_COUNT,          //< Number of interpolation methods
00042 };
00043 
00044 // Shortcuts for the fastest and best interpolation methods
00045 #define INTERPOLATE_DEFAULT INTERPOLATE_BILINEAR
00046 #define INTERPOLATE_FAST    INTERPOLATE_NEAREST
00047 #define INTERPOLATE_BEST    INTERPOLATE_BIQUADRATIC
00048 
00049 enum FillMethod {
00050     FILL_BLANK,         //< Fill zeroes at blank locations
00051     FILL_ORIGINAL,      //< Original image at blank locations
00052     FILL_CLAMP,         //< Extruded edge value at blank locations
00053     FILL_MIRROR,        //< Mirrored edge at blank locations
00054     FILL_COUNT,         //< Number of edge fill methods
00055 };
00056 
00057 // Shortcuts for fill methods
00058 #define FILL_DEFAULT FILL_ORIGINAL
00059 
00074 void avfilter_get_matrix(float x_shift, float y_shift, float angle, float zoom, float *matrix);
00075 
00083 void avfilter_add_matrix(const float *m1, const float *m2, float *result);
00084 
00092 void avfilter_sub_matrix(const float *m1, const float *m2, float *result);
00093 
00101 void avfilter_mul_matrix(const float *m1, float scalar, float *result);
00102 
00118 void avfilter_transform(const uint8_t *src, uint8_t *dst,
00119                         int src_stride, int dst_stride,
00120                         int width, int height, const float *matrix,
00121                         enum InterpolateMethod interpolate,
00122                         enum FillMethod fill);
00123 
00124 #endif /* AVFILTER_TRANSFORM_H */
Generated on Fri Feb 1 2013 14:34:49 for FFmpeg by doxygen 1.7.1