-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paths3c_pp.h
70 lines (58 loc) · 2.88 KB
/
s3c_pp.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
#ifndef _S3C_PP_H_
#define _S3C_PP_H_
typedef enum {
DMA_ONESHOT,
FIFO_FREERUN
} s3c_pp_run_mode_t;
typedef enum {
PAL1, PAL2, PAL4, PAL8,
RGB8, ARGB8, RGB16, ARGB16, RGB18, RGB24, RGB30, ARGB24,
YC420, YC422, // Non-interleave
CRYCBY, CBYCRY, YCRYCB, YCBYCR, YUV444 // Interleave
} s3c_color_space_t;
typedef enum {
INTERLACE_MODE,
PROGRESSIVE_MODE
} s3c_pp_scan_mode_t;
// Structure type for IOCTL commands S3C_PP_SET_PARAMS, S3C_PP_SET_INPUT_BUF_START_ADDR_PHY,
// S3C_PP_SET_INPUT_BUF_NEXT_START_ADDR_PHY, S3C_PP_SET_OUTPUT_BUF_START_ADDR_PHY.
typedef struct {
unsigned int src_full_width; // Source Image Full Width (Virtual screen size)
unsigned int src_full_height; // Source Image Full Height (Virtual screen size)
unsigned int src_start_x; // Source Image Start width offset
unsigned int src_start_y; // Source Image Start height offset
unsigned int src_width; // Source Image Width
unsigned int src_height; // Source Image Height
unsigned int src_buf_addr_phy; // Base Address of the Source Image : Physical Address
unsigned int src_next_buf_addr_phy; // Base Address of Source Image to be displayed next time in FIFO_FREERUN Mode
s3c_color_space_t src_color_space; // Color Space of the Source Image
unsigned int dst_full_width; // Destination Image Full Width (Virtual screen size)
unsigned int dst_full_height; // Destination Image Full Height (Virtual screen size)
unsigned int dst_start_x; // Destination Image Start width offset
unsigned int dst_start_y; // Destination Image Start height offset
unsigned int dst_width; // Destination Image Width
unsigned int dst_height; // Destination Image Height
unsigned int dst_buf_addr_phy; // Base Address of the Destination Image : Physical Address
s3c_color_space_t dst_color_space; // Color Space of the Destination Image
s3c_pp_run_mode_t out_path; // POST running mode(PER_FRAME or FREE_RUN)
s3c_pp_scan_mode_t scan_mode; // INTERLACE_MODE, PROGRESSIVE_MODE
} s3c_pp_params_t;
// Structure type for IOCTL commands S3C_PP_ALLOC_KMEM, S3C_PP_FREE_KMEM.
typedef struct {
int size;
unsigned int vir_addr;
unsigned int phy_addr;
} s3c_pp_mem_alloc_t;
#define PP_IOCTL_MAGIC 'P'
#define S3C_PP_SET_PARAMS _IO(PP_IOCTL_MAGIC, 0)
#define S3C_PP_START _IO(PP_IOCTL_MAGIC, 1)
#define S3C_PP_GET_SRC_BUF_SIZE _IO(PP_IOCTL_MAGIC, 2)
#define S3C_PP_SET_SRC_BUF_ADDR_PHY _IO(PP_IOCTL_MAGIC, 3)
#define S3C_PP_SET_SRC_BUF_NEXT_ADDR_PHY _IO(PP_IOCTL_MAGIC, 4)
#define S3C_PP_GET_DST_BUF_SIZE _IO(PP_IOCTL_MAGIC, 5)
#define S3C_PP_SET_DST_BUF_ADDR_PHY _IO(PP_IOCTL_MAGIC, 6)
#define S3C_PP_ALLOC_KMEM _IO(PP_IOCTL_MAGIC, 7)
#define S3C_PP_FREE_KMEM _IO(PP_IOCTL_MAGIC, 8)
#define S3C_PP_GET_RESERVED_MEM_SIZE _IO(PP_IOCTL_MAGIC, 9)
#define S3C_PP_GET_RESERVED_MEM_ADDR_PHY _IO(PP_IOCTL_MAGIC, 10)
#endif // _S3C_PP_H_