4 * Copyright (C) Georg Martius - June 2011
5 * georg dot martius at web dot de
7 * This file is part of vid.stab video stabilization library
9 * vid.stab is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License,
11 * as published by the Free Software Foundation; either version 2, or
12 * (at your option) any later version.
14 * vid.stab is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with GNU Make; see the file COPYING. If not, write to
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 * This work is licensed under the Creative Commons
24 * Attribution-NonCommercial-ShareAlike 2.5 License. To view a copy of
25 * this license, visit http://creativecommons.org/licenses/by-nc-sa/2.5/
26 * or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
27 * San Francisco, California, 94105, USA.
28 * This EXCLUDES COMMERCIAL USAGE
31 #ifndef __TRANSFORMFLOAT_H
32 #define __TRANSFORMFLOAT_H
34 #include "transformtype.h"
38 #define _FLT(n) n ## _float
43 struct _VSTransformData
;
45 /// does the actual transformation in Packed space
46 int _FLT(transformPacked
)(struct _VSTransformData
* td
, VSTransform t
);
47 /// does the actual transformation in Planar space
48 int _FLT(transformPlanar
)(struct _VSTransformData
* td
, VSTransform t
);
51 * interpolate: general interpolation function pointer for one channel image data
54 * rv: destination pixel (call by reference)
55 * x,y: the source coordinates in the image img. Note this
56 * are real-value coordinates, that's why we interpolate
58 * img_linesize: length of one line in bytes (>= width)
59 * width,height: dimension of image
60 * def: default value if coordinates are out of range
63 typedef void (*_FLT(vsInterpolateFun
))(uint8_t *rv
, float x
, float y
,
64 const uint8_t *img
, int img_linesize
,
65 int width
, int height
, uint8_t def
);
67 /* forward deklarations, please look in the .c file for documentation*/
68 void _FLT(interpolateBiLinBorder
)(uint8_t *rv
, float x
, float y
,
69 const uint8_t *img
, int img_linesize
,
70 int w
, int h
, uint8_t def
);
71 void _FLT(interpolateBiCub
)(uint8_t *rv
, float x
, float y
,
72 const uint8_t *img
, int img_linesize
,
73 int width
, int height
, uint8_t def
);
74 void _FLT(interpolateBiLin
)(uint8_t *rv
, float x
, float y
,
75 const uint8_t *img
, int img_linesize
,
76 int w
, int h
, uint8_t def
);
77 void _FLT(interpolateLin
)(uint8_t *rv
, float x
, float y
,
78 const uint8_t *img
, int img_linesize
,
79 int w
, int h
, uint8_t def
);
80 void _FLT(interpolateZero
)(uint8_t *rv
, float x
, float y
,
81 const uint8_t *img
, int img_linesize
,
82 int w
, int h
, uint8_t def
);
83 void _FLT(interpolateN
)(uint8_t *rv
, float x
, float y
,
84 const uint8_t *img
, int img_linesize
,
85 int width
, int height
,
86 uint8_t N
, uint8_t channel
, uint8_t def
);
92 * c-file-style: "stroustrup"
93 * c-file-offsets: ((case-label . *) (statement-case-intro . *))
94 * indent-tabs-mode: nil
97 * vim: expandtab shiftwidth=4: