1 /* 2 * bayertnr_uapi_head_v2.h 3 * 4 * Copyright (c) 2021 Rockchip Corporation 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 */ 19 20 #ifndef __CALIBDBV2_UAPI_BAYER_TNR_HEADER_V2_H__ 21 #define __CALIBDBV2_UAPI_BAYER_TNR_HEADER_V2_H__ 22 23 #include "rk_aiq_comm.h" 24 25 RKAIQ_BEGIN_DECLARE 26 27 28 typedef struct RK_Bayertnr_Params_V2_Select_s 29 { 30 // M4_BOOL_DESC("enable", "1") 31 int enable; 32 // M4_BOOL_DESC("lo_enable", "1") 33 int lo_enable; 34 // M4_BOOL_DESC("hi_enable", "1") 35 int hi_enable; 36 // M4_BOOL_DESC("lo_med_en", "1") 37 int lo_med_en; 38 // M4_BOOL_DESC("lo_gsbay_en", "1") 39 int lo_gsbay_en; 40 // M4_BOOL_DESC("lo_gslum_en", "1") 41 int lo_gslum_en; 42 // M4_BOOL_DESC("hi_med_en", "1") 43 int hi_med_en; 44 // M4_BOOL_DESC("hi_gslum_en", "1") 45 int hi_gslum_en; 46 47 48 // M4_ARRAY_DESC("lumapoint", "s32", M4_SIZE(1,16), M4_RANGE(0,65535), "[512,1024,1536,2048,3072,4096,5120,6144,7168,8192,9216,10240,11264,12288,13312,14336]", M4_DIGIT(0), M4_DYNAMIC(0)) 49 int lumapoint[16]; 50 // M4_ARRAY_DESC("sigma", "s32", M4_SIZE(1,16), M4_RANGE(0,65535), "[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256]", M4_DIGIT(0), M4_DYNAMIC(0)) 51 int sigma[16]; 52 53 // M4_ARRAY_DESC("lumapoint2", "s32", M4_SIZE(1,16), M4_RANGE(0,65535), "[512,1024,1536,2048,3072,4096,5120,6144,7168,8192,9216,10240,11264,12288,13312,14336]", M4_DIGIT(0), M4_DYNAMIC(0)) 54 int lumapoint2[16]; 55 // M4_ARRAY_DESC("lo_sigma", "s32", M4_SIZE(1,16), M4_RANGE(0,65535), "[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32]", M4_DIGIT(0), M4_DYNAMIC(0)) 56 int lo_sigma[16]; 57 // M4_ARRAY_DESC("hi_sigma", "s32", M4_SIZE(1,16), M4_RANGE(0,65535), "[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256]", M4_DIGIT(0), M4_DYNAMIC(0)) 58 int hi_sigma[16]; 59 60 // M4_NUMBER_DESC("thumbds", "f32", M4_RANGE(0, 8), "8", M4_DIGIT(2)) 61 int thumbds; 62 63 // M4_BOOL_DESC("global_pk_en", "1") 64 int global_pk_en; 65 // M4_NUMBER_DESC("global_pksq", "s32", M4_RANGE(0, 268435455), "1024", M4_DIGIT(0)) 66 int global_pksq; 67 68 // M4_NUMBER_DESC("lo_filter_strength", "f32", M4_RANGE(0, 16), "1.0", M4_DIGIT(2)) 69 float lo_filter_strength; 70 // M4_NUMBER_DESC("hi_filter_strength", "f32", M4_RANGE(0, 16), "1.0", M4_DIGIT(2)) 71 float hi_filter_strength; 72 // M4_NUMBER_DESC("soft_threshold_ratio", "f32", M4_RANGE(0, 1.0), "0.0", M4_DIGIT(2)) 73 float soft_threshold_ratio; 74 75 // M4_NUMBER_DESC("clipwgt", "f32", M4_RANGE(0, 1), "0.03215", M4_DIGIT(5)) 76 float clipwgt; 77 // M4_NUMBER_DESC("hi_wgt_comp", "f32", M4_RANGE(0, 1), "0.16", M4_DIGIT(2)) 78 float hi_wgt_comp; 79 // M4_NUMBER_DESC("hidif_th", "f32", M4_RANGE(0, 65535), "32767", M4_DIGIT(0)) 80 float hidif_th; 81 } RK_Bayertnr_Params_V2_Select_t; 82 83 84 typedef struct Abayertnr_ExpInfo_V2_s { 85 // M4_NUMBER_DESC("hdr_mode", "u8", M4_RANGE(0, 2), "0", M4_DIGIT(0)) 86 int hdr_mode; 87 88 // M4_NUMBER_DESC("snr_mode", "s8", M4_RANGE(0, 2), "0", M4_DIGIT(0)) 89 int snr_mode; 90 91 // M4_ARRAY_DESC("time", "f32", M4_SIZE(1,3), M4_RANGE(0, 1024), "0.01", M4_DIGIT(6)) 92 float arTime[3]; 93 // M4_ARRAY_DESC("again", "f32", M4_SIZE(1,3), M4_RANGE(0, 204800), "1", M4_DIGIT(3)) 94 float arAGain[3]; 95 // M4_ARRAY_DESC("dgain", "f32", M4_SIZE(1,3), M4_RANGE(0, 204800), "1", M4_DIGIT(3)) 96 float arDGain[3]; 97 // M4_ARRAY_DESC("iso", "u32", M4_SIZE(1,3), M4_RANGE(0, 204800), "1", M4_DIGIT(0)) 98 int arIso[3]; 99 100 // M4_NUMBER_DESC("isoLow", "u32", M4_RANGE(0, 204800), "50", M4_DIGIT(0)) 101 int isoLow; 102 // M4_NUMBER_DESC("isoHigh", "u32", M4_RANGE(0, 204800), "50", M4_DIGIT(0)) 103 int isoHigh; 104 105 106 } Abayertnr_ExpInfo_V2_t; 107 108 109 typedef struct rk_aiq_bayertnr_info_v2_s { 110 // M4_ARRAY_TABLE_DESC("sync", "array_table_ui", "none", "1") 111 rk_aiq_uapi_sync_t sync; 112 // M4_NUMBER_DESC("iso", "u32", M4_RANGE(0, 204800), "50", M4_DIGIT(0), "0", "0") 113 int iso; 114 // M4_ARRAY_TABLE_DESC("expo_info", "normal_ui_style", "none", "0", "0") 115 Abayertnr_ExpInfo_V2_t expo_info; 116 } rk_aiq_bayertnr_info_v2_t; 117 118 119 RKAIQ_END_DECLARE 120 121 #endif 122