Commit | Line | Data |
---|---|---|
80f575fc DM |
1 | /* |
2 | * transformfixedpoint.h | |
3 | * | |
4 | * Copyright (C) Georg Martius - June 2011 | |
5 | * georg dot martius at web dot de | |
6 | * | |
7 | * This file is part of vid.stab video stabilization library | |
8 | * | |
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. | |
13 | * | |
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. | |
18 | * | |
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. | |
22 | * | |
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 | |
29 | * | |
30 | */ | |
31 | #ifndef __TRANSFORMFIXEDPOINT_H | |
32 | #define __TRANSFORMFIXEDPOINT_H | |
33 | ||
34 | #include "transformtype.h" | |
35 | #include <stdint.h> | |
36 | ||
37 | typedef int32_t fp8; | |
38 | typedef int32_t fp16; // also ncot definition of interpolFun in transform.h | |
39 | ||
40 | struct _VSTransformData; | |
41 | ||
42 | /// does the actual transformation in Packed space | |
43 | int transformPacked(struct _VSTransformData* td, VSTransform t); | |
44 | ||
45 | /// does the actual transformation in Planar space | |
46 | int transformPlanar(struct _VSTransformData* td, VSTransform t); | |
47 | ||
48 | // testing | |
49 | /// does the actual transformation in Planar space | |
50 | int transformPlanar_orc(struct _VSTransformData* td, VSTransform t); | |
51 | ||
52 | ||
53 | /* forward deklarations, please see .c file for documentation*/ | |
54 | void interpolateBiLinBorder(uint8_t *rv, fp16 x, fp16 y, | |
55 | const uint8_t *img, int img_linesize, | |
56 | int w, int h, uint8_t def); | |
57 | void interpolateBiCub(uint8_t *rv, fp16 x, fp16 y, | |
58 | const uint8_t *img, int img_linesize, | |
59 | int width, int height, uint8_t def); | |
60 | void interpolateBiLin(uint8_t *rv, fp16 x, fp16 y, | |
61 | const uint8_t *img, int img_linesize, | |
62 | int w, int h, uint8_t def); | |
63 | void interpolateLin(uint8_t *rv, fp16 x, fp16 y, | |
64 | const uint8_t *img, int img_linesize, | |
65 | int w, int h, uint8_t def); | |
66 | void interpolateZero(uint8_t *rv, fp16 x, fp16 y, | |
67 | const uint8_t *img, int img_linesize, | |
68 | int w, int h, uint8_t def); | |
69 | void interpolateN(uint8_t *rv, fp16 x, fp16 y, | |
70 | const uint8_t *img, int img_linesize, | |
71 | int width, int height, | |
72 | uint8_t N, uint8_t channel, uint8_t def); | |
73 | ||
74 | #endif | |
75 | ||
76 | /* | |
77 | * Local variables: | |
78 | * c-file-style: "stroustrup" | |
79 | * c-file-offsets: ((case-label . *) (statement-case-intro . *)) | |
80 | * indent-tabs-mode: nil | |
81 | * End: | |
82 | * | |
83 | * vim: expandtab shiftwidth=4: | |
84 | */ |