-
Notifications
You must be signed in to change notification settings - Fork 5
/
mt.h
77 lines (64 loc) · 1.77 KB
/
mt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
int libmtsad(
unsigned char *src, int32_t width, int32_t height,
unsigned char *tpl, int32_t tpl_width, int32_t tpl_height,
unsigned char *out
);
int libmtssd(
unsigned char *src, int32_t width, int32_t height,
unsigned char *tpl, int32_t tpl_width, int32_t tpl_height,
unsigned char *out
);
//
// {{{ NCC
//
int libmtncc(
unsigned char *src, int32_t width, int32_t height,
unsigned char *tpl, int32_t tpl_width, int32_t tpl_height,
unsigned char *out
);
typedef struct prepared_ncc_template_t {
int32_t tpl_width;
int32_t tpl_height;
unsigned char *tuple_1; // float *t_val
unsigned char *tuple_2; // float *t_sum
} prepared_ncc_template_t;
prepared_ncc_template_t *create_prepare_ncc_template(
int32_t tpl_width, int32_t tpl_height
);
void free_prepare_ncc_template(prepared_ncc_template_t *p);
int libprepare_ncc_tpl(unsigned char *tpl, prepared_ncc_template_t *p);
int libprepared_mtncc(
unsigned char *src, int32_t width, int32_t height,
prepared_ncc_template_t *p,
unsigned char *out
);
//
// }}} NCC
//
//
// {{{ ZNCC
//
int libmtzncc(
unsigned char *src, int32_t width, int32_t height,
unsigned char *tpl, int32_t tpl_width, int32_t tpl_height,
unsigned char *out
);
typedef struct prepared_zncc_template_t {
int32_t tpl_width;
int32_t tpl_height;
unsigned char *tuple_1; // float *t_val
unsigned char *tuple_2; // float *t_stddev
} prepared_zncc_template_t;
prepared_zncc_template_t *create_prepare_zncc_template(
int32_t tpl_width, int32_t tpl_height
);
void free_prepare_zncc_template(prepared_zncc_template_t *p);
int libprepare_zncc_tpl(unsigned char *tpl, prepared_zncc_template_t *p);
int libprepared_mtzncc(
unsigned char *src, int32_t width, int32_t height,
prepared_zncc_template_t *p,
unsigned char *out
);
//
// }}} ZNCC
//