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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call into the kernel available to libc. It contains only constants,
*** structures, and macros generated from the original header, and thus,
*** contains no copyrightable information.
***
****************************************************************************
****************************************************************************/
#ifndef _MSM_VENC_H_
#define _MSM_VENC_H_
#include <linux/types.h>
struct venc_buf {
unsigned int src_id;
unsigned int fd;
unsigned int offset;
unsigned int size;
};
struct q6_init_config {
unsigned short venc_standard;
unsigned short partial_run_length_flag;
unsigned short h263_annex_ispt;
unsigned short h263_annex_jspt;
unsigned short h263_annex_tspt;
unsigned short rc_flag;
unsigned short one_mv_flag;
unsigned short acdc_pred_enable;
unsigned short rounding_bit_ctrl;
unsigned short rotation_flag;
unsigned short max_mvx;
unsigned short max_mvy;
unsigned short enc_frame_height_inmb;
unsigned short enc_frame_width_inmb;
unsigned short dvs_frame_height;
unsigned short dvs_frame_width;
unsigned int ref_frame_buf1_phy;
unsigned int ref_frame_buf2_phy;
unsigned int rlc_buf1_phy;
unsigned int rlc_buf2_phy;
unsigned int rlc_buf_length;
};
struct init_config {
struct venc_buf ref_frame_buf1;
struct venc_buf ref_frame_buf2;
struct venc_buf rlc_buf1;
struct venc_buf rlc_buf2;
struct q6_init_config q6_init_config;
};
struct q6_encode_param {
unsigned int y_addr_phy;
unsigned int uv_addr_phy;
unsigned int x_offset;
unsigned int y_offset;
unsigned int frame_rho_budget;
unsigned int frame_type;
unsigned int qp;
};
struct encode_param {
struct venc_buf y_addr;
struct venc_buf uv_addr;
struct q6_encode_param q6_encode_param;
};
struct intra_refresh {
unsigned int intra_refresh_enable;
unsigned int intra_mb_num;
};
struct rc_config {
unsigned short max_frame_qp_up_delta;
unsigned short max_frame_qp_down_delta;
unsigned short min_frame_qp;
unsigned short max_frame_qp;
};
struct q6_frame_type {
unsigned int frame_type;
unsigned int frame_len;
unsigned int frame_addr;
unsigned int map_table;
};
struct frame_type {
struct venc_buf frame_addr;
struct q6_frame_type q6_frame_type;
};
#define VENC_IOCTL_MAGIC 'V'
#define VENC_IOCTL_INITIALIZE _IOW(VENC_IOCTL_MAGIC, 1, struct init_config)
#define VENC_IOCTL_ENCODE _IOW(VENC_IOCTL_MAGIC, 2, struct encode_param)
#define VENC_IOCTL_INTRA_REFRESH _IOW(VENC_IOCTL_MAGIC, 3, struct intra_refresh)
#define VENC_IOCTL_RC_CONFIG _IOW(VENC_IOCTL_MAGIC, 4, struct rc_config)
#define VENC_IOCTL_ENCODE_CONFIG _IOW(VENC_IOCTL_MAGIC, 5, struct init_config)
#define VENC_IOCTL_STOP _IO(VENC_IOCTL_MAGIC, 6)
#define VENC_IOCTL_WAIT_FOR_ENCODE _IOR(VENC_IOCTL_MAGIC, 7, struct frame_type)
#define VENC_IOCTL_STOP_ENCODE _IO(VENC_IOCTL_MAGIC, 8)
#endif
|