-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathvideo.h
More file actions
31 lines (24 loc) · 703 Bytes
/
Copy pathvideo.h
File metadata and controls
31 lines (24 loc) · 703 Bytes
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
#pragma once
#define SCREENX 384
#define SCREENY 288
#define rgb2y(b, g, r, y) \
y=(unsigned char)(((int)(299*r) + (int)(587*g) + (int)(114*b) + 5)/1000)
#define rgb2yuv(b, g, r, y, u, v) \
rgb2y(b, g, r, y); \
u = (((int)(-169*r) - (int)(331*g) + (int)(499*b)+128000 + 5)/1000); \
v = (((int)(499*r) - (int)(418*g) - (int)(81*b)+128000 + 5)/1000)
struct Yuv {
unsigned char y;
int u;
int v;
};
class TED;
struct Color {
double hue;
double luma;
double saturation;
};
extern void init_palette(TED *videoChip);
extern unsigned int *palette_get_rgb();
extern void video_convert_buffer(unsigned int *pImage, unsigned int srcpitch, unsigned char *screenptr);
extern rvar_t videoSettings[];