xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkisp_demo/demo/rkisp_demo.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  *  Copyright (c) 2019 Rockchip Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 
19 #ifndef _RKISP_DEMO_H_
20 #define _RKISP_DEMO_H_
21 
22 #include <linux/videodev2.h>
23 #include "uAPI2/rk_aiq_user_api2_imgproc.h"
24 #include "uAPI2/rk_aiq_user_api2_camgroup.h"
25 
26 #define DBG(...) do { if(!silent) printf(__VA_ARGS__); } while(0)
27 #define ERR(...) do { printf(__VA_ARGS__); } while (0)
28 
29 typedef struct _demo_context {
30     char                    out_file[255];
31     char                    dev_name[255];
32     char                    dev_name2[255];
33     char                    dev_name3[255];
34     char                    dev_name4[255];
35     char                    sns_name[32];
36     int                     dev_using;
37     int                     width;
38     int                     height;
39     int                     format;
40     int                     fd;
41     enum v4l2_buf_type      buf_type;
42     struct buffer           *buffers;
43     unsigned int            n_buffers;
44     int                     frame_count;
45     FILE                    *fp;
46     rk_aiq_sys_ctx_t*       aiq_ctx;
47     rk_aiq_camgroup_ctx_t*  camgroup_ctx;
48     int                     vop;
49     int                     rkaiq;
50     int                     writeFile;
51     int                     writeFileSync;
52     int                     pponeframe;
53     int                     hdrmode;
54     int                     limit_range;
55     int                     fd_pp_input;
56     int                     fd_isp_mp;
57     struct buffer           *buffers_mp;
58     int                     outputCnt;
59     int                     skipCnt;
60 
61     char                    yuv_dir_path[64];
62     bool                    _is_yuv_dir_exist;
63     int                     capture_yuv_num;
64     bool                    is_capture_yuv;
65     int                     ctl_type;
66     char                    iqpath[256];
67     char                    orppath[256];
68     int                     orpRawW;
69     int                     orpRawH;
70     char                    orpRawFmt[10];
71     bool                    isOrp;
72     bool                    orpStop;
73     bool                    orpStopped;
74     bool                    camGroup;
75 } demo_context_t;
76 
77 #endif
78