FFmpeg  1.2.12
transform.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Georg Martius <georg.martius@web.de>
3  * Copyright (C) 2010 Daniel G. Taylor <dan@programmer-art.org>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef AVFILTER_TRANSFORM_H
23 #define AVFILTER_TRANSFORM_H
24 
25 #include <stdint.h>
26 
40  INTERPOLATE_NEAREST, //< Nearest-neighbor (fast)
41  INTERPOLATE_BILINEAR, //< Bilinear
42  INTERPOLATE_BIQUADRATIC, //< Biquadratic (best)
43  INTERPOLATE_COUNT, //< Number of interpolation methods
44 };
45 
46 // Shortcuts for the fastest and best interpolation methods
47 #define INTERPOLATE_DEFAULT INTERPOLATE_BILINEAR
48 #define INTERPOLATE_FAST INTERPOLATE_NEAREST
49 #define INTERPOLATE_BEST INTERPOLATE_BIQUADRATIC
50 
51 enum FillMethod {
52  FILL_BLANK, //< Fill zeroes at blank locations
53  FILL_ORIGINAL, //< Original image at blank locations
54  FILL_CLAMP, //< Extruded edge value at blank locations
55  FILL_MIRROR, //< Mirrored edge at blank locations
56  FILL_COUNT, //< Number of edge fill methods
57 };
58 
59 // Shortcuts for fill methods
60 #define FILL_DEFAULT FILL_ORIGINAL
61 
76 void avfilter_get_matrix(float x_shift, float y_shift, float angle, float zoom, float *matrix);
77 
85 void avfilter_add_matrix(const float *m1, const float *m2, float *result);
86 
94 void avfilter_sub_matrix(const float *m1, const float *m2, float *result);
95 
103 void avfilter_mul_matrix(const float *m1, float scalar, float *result);
104 
121 int avfilter_transform(const uint8_t *src, uint8_t *dst,
122  int src_stride, int dst_stride,
123  int width, int height, const float *matrix,
125  enum FillMethod fill);
126 
127 #endif /* AVFILTER_TRANSFORM_H */