forked from MiSTer-devel/Main_MiSTer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscaler.h
More file actions
41 lines (33 loc) · 797 Bytes
/
scaler.h
File metadata and controls
41 lines (33 loc) · 797 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
32
33
34
35
36
37
38
39
40
41
/*
Copyright 2019 alanswx
with help from the MiSTer contributors including Grabulosaure
*/
#ifndef SCALER_H
#define SCALER_H
typedef enum {
RGB,
BGR,
BGRA,
RGBA,
ARGB32, // respect endianness
YUV,
} mister_scaler_format_t;
typedef struct {
int header;
int width;
int height;
int line;
int output_width;
int output_height;
char *map;
int num_bytes;
int map_off;
} mister_scaler;
#define MISTER_SCALER_BASEADDR 0x20000000
#define MISTER_SCALER_BUFFERSIZE 2048*3*1024
mister_scaler *mister_scaler_init();
int mister_scaler_read(mister_scaler *,unsigned char *buffer, mister_scaler_format_t format = ARGB32);
void mister_scaler_free(mister_scaler *);
void request_screenshot(char *cmd, int scaled = 0);
void screenshot_cb(void);
#endif