Commit | Line | Data |
---|---|---|
80f575fc DM |
1 | /* |
2 | * transform.h | |
3 | * | |
4 | * Copyright (C) Georg Martius - June 2007 - 2013 | |
5 | * | |
6 | * This file is part of transcode, a video stream processing tool | |
7 | * | |
8 | * transcode is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation; either version 2, or (at your option) | |
11 | * any later version. | |
12 | * | |
13 | * transcode is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with GNU Make; see the file COPYING. If not, write to | |
20 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
21 | * | |
22 | */ | |
23 | #ifndef __TRANSFORMTYPE_H | |
24 | #define __TRANSFORMTYPE_H | |
25 | ||
26 | #include <stdio.h> | |
27 | #include "vsvector.h" | |
28 | ||
29 | /* structure to hold information about frame transformations | |
30 | x,y are translations, alpha is a rotation around the center in RAD, | |
31 | zoom is a percentage to zoom in and | |
32 | extra is for additional information like scene cut (unused) | |
33 | */ | |
34 | typedef struct _transform { | |
35 | double x; | |
36 | double y; | |
37 | double alpha; | |
38 | double zoom; | |
39 | double barrel; | |
40 | double rshutter; | |
41 | int extra; /* -1: ignore transform (only internal use); | |
42 | 0 for normal trans; 1 for inter scene cut (unused) */ | |
43 | } VSTransform; | |
44 | ||
45 | /** stores x y and size of a measurement field */ | |
46 | typedef struct _field { | |
47 | int x; // middle position x | |
48 | int y; // middle position y | |
49 | int size; // size of field | |
50 | } Field; | |
51 | ||
52 | /** stores x y coordinates (integer) */ | |
53 | typedef struct _vec { | |
54 | int x; // middle position x | |
55 | int y; // middle position y | |
56 | } Vec; | |
57 | ||
58 | /* structure to hold information about local motion. | |
59 | */ | |
60 | typedef struct _localmotion { | |
61 | Vec v; | |
62 | Field f; | |
63 | double contrast; // local contrast of the measurement field | |
64 | double match; // quality of match | |
65 | } LocalMotion; | |
66 | ||
67 | typedef VSVector LocalMotions; | |
68 | ||
69 | #endif | |
70 | ||
71 | /* | |
72 | * Local variables: | |
73 | * c-file-style: "stroustrup" | |
74 | * c-file-offsets: ((case-label . *) (statement-case-intro . *)) | |
75 | * indent-tabs-mode: nil | |
76 | * c-basic-offset: 2 t | |
77 | * End: | |
78 | * | |
79 | * vim: expandtab shiftwidth=2: | |
80 | */ |