xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkisp_demo/demo/sample/sample_comm.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (c) 2021-2022 Rockchip Eletronics Co., Ltd.
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 #ifndef _SAMPLE_COMM_H_
17 #define _SAMPLE_COMM_H_
18 
19 #include <stdio.h>
20 #include "rkisp_demo.h"
21 #include "rk_aiq_comm.h"
22 
23 #define CLEAR() printf("\x1b[2J\x1b[H");
24 #define RESET_CURSOR() printf("\033[H");
25 
26 #define RKAIQ_SAMPLE_CHECK_RET(ret, format, ...) \
27     if (ret) { \
28         printf(format, ##__VA_ARGS__); \
29         return ret; \
30     }
31 
32 enum RK_ISP_HW_MODULE_e {
33     RK_ISP_AE,
34     RK_ISP_AWB,
35     RK_ISP_AWB32,
36     RK_ISP_AF,
37     RK_ISP_ACCM,
38     RK_ISP_A3DLUT,
39     RK_ISP_ADRC,
40     RK_ISP_AMERGE,
41     RK_ISP_AGAMMA,
42     RK_ISP_ADEHAZE,
43     RK_ISP_AYNR,
44     RK_ISP_ACNR,
45     RK_ISP_ASHARP,
46     RK_ISP_ABAYER2DNR,
47     RK_ISP_ABAYERTNR,
48     RK_ISP_CSM,
49     RK_ISP_ABLC,
50     RK_ISP_AGIC,
51     RK_ISP_ALDCH,
52     RK_ISP_ADEBAYER,
53     RK_ISP_ACP,
54     RK_ISP_AIE,
55     RK_ISP_CGC,
56     RK_ISP_CAC,
57     RK_ISP_AGAIN,
58     RK_ISP_ACCM_V2,
59     RK_ISP_ALDCH_V21,
60     RK_SMARTIR,
61     RK_ISP_MAX,
62 };
63 
64 typedef int (*uapi_case_func)(const void*);
65 
66 typedef struct __uapi_case {
67     // description of this uapi
68     const char* desc;
69     // uapi function
70     uapi_case_func func;
71 } uapi_case_t;
72 
73 int uapi_usage_show(uapi_case_t* uapi_list);
74 
75 int uapi_list_count(uapi_case_t* uapi_list);
76 
77 int uapi_process_loop(const rk_aiq_sys_ctx_t* ctx, uapi_case_t* uapi_list);
78 
79 #endif
80 
81