-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilter16.h
51 lines (36 loc) · 1.75 KB
/
filter16.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
// File: filter16.h
// Created by: Kyle Granger
// License: MIT
#ifndef __FILTER16_H
#define __FILTER16_H
#include "stdint.h"
typedef struct color_t {
uint16_t b;
uint16_t g;
uint16_t r;
uint16_t a;
} color_t;
// 2D down
extern void Downfilter (color_t *src1, color_t *src2, color_t *src3, color_t *src4, color_t *dst);
extern void DownfilterLeft (color_t *src1, color_t *src2, color_t *src3, color_t *src4, color_t *dst);
extern void DownfilterRight (color_t *src1, color_t *src2, color_t *src3, color_t *src4, color_t *dst);
extern void Downfilter (color_t *src1, color_t *src2, color_t *src3, color_t *dst);
extern void DownfilterLeft (color_t *src1, color_t *src2, color_t *src3, color_t *dst);
extern void DownfilterRight (color_t *src1, color_t *src2, color_t *src3, color_t *dst);
// 2D down
extern void Upfilter (color_t *src1, color_t *src2, color_t *src3, color_t *dst1, color_t *dst2);
extern void UpfilterLeft (color_t *src1, color_t *src2, color_t *src3, color_t *dst1, color_t *dst2);
extern void UpfilterRight(color_t *src1, color_t *src2, color_t *src3, color_t *dst1, color_t *dst2);
// X down
extern void DownfilterX(color_t *src1, color_t *dst);
extern void DownfilterXLeft(color_t *src1, color_t *dst);
extern void DownfilterXRight(color_t *src1, color_t *dst);
// X up
extern void UpfilterX(color_t *src1, color_t *dst);
extern void UpfilterXLeft(color_t *src1, color_t *dst);
extern void UpfilterXRight(color_t *src1, color_t *dst);
// Y filtering
extern void DownfilterY(color_t *src1, color_t *src2, color_t *src3, color_t *src4, color_t *dst);
extern void DownfilterY(color_t *src1, color_t *src2, color_t *src3, color_t *dst);
extern void UpfilterY(color_t *src1, color_t *src2, color_t *src3, color_t *dst1, color_t *dst2);
#endif