mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 05:27:24 +00:00
fix imp_control for v2
This commit is contained in:
parent
988e3de089
commit
1c889f13cc
11
README.md
11
README.md
@ -327,15 +327,16 @@ IMP_CONTROL: Tune various options presented by IMP. Works for audio and video.
|
||||
| tune_sharpness | -128 to 128 | Sharpness Control |
|
||||
| tune_saturation | -128 to 128 | Saturation Control |
|
||||
| tune_aecomp | 0 to 255 | Auto Exposure Target |
|
||||
| tune_aeitmax | 0 to 10000 | Auto Exposure Maxiumum |
|
||||
| tune_dpc_strength | -128 to 128 | DPC Strength |
|
||||
| tune_drc_strength | -128 to 128 | DRC Strength |
|
||||
| tune_aeitmax | 0 to 10000 | Auto Exposure Maxiumum (no v2) |
|
||||
| tune_dpc_strength | -128 to 128 | DPC Strength (no v2) |
|
||||
| tune_drc_strength | -128 to 128 | DRC Strength (no v2) |
|
||||
| tune_hilightdepress | 0 to 10 | Glare Supression |
|
||||
| tune_temper | -128 to 128 | 3D Noise reduction strength |
|
||||
| tune_sinter | -128 to 128 | 2D Noise reduction strength |
|
||||
| tune_again | 0 to 99999 | Set sensor A-Gain maximum |
|
||||
| tune_dgain | see notes | Maximum D-Gain set by the ISP |
|
||||
| tune_backlightcomp | -1 to 3500 | Backlight Compensation? (undocumented) |
|
||||
| tune_backlightcomp | -1 to 3500 | Backlight Compensation? (undocumented, no v2) |
|
||||
| tune_dps | 50-150 | Set DPC intensity (v2 only) |
|
||||
|
||||
|
||||
tune_dgain: 0 means 1x, 32 means 2x, and so on
|
||||
@ -349,7 +350,7 @@ white balance adjustment
|
||||
enable wide dynamic range support
|
||||
exposure value support
|
||||
|
||||
---
|
||||
=======
|
||||
|
||||
## Latest Updates
|
||||
|
||||
|
Binary file not shown.
2
file.chk
2
file.chk
@ -79,7 +79,7 @@ ab04957b286c8c21f1532bf1947696bd SD_ROOT/wz_mini/usr/bin/upgrade-run.sh
|
||||
4c780f0455481d106d47d89f0ae04ed5 SD_ROOT/wz_mini/lib/uClibc.tar
|
||||
9afeb088e4cbabbe0b04033b560204d0 SD_ROOT/wz_mini/lib/libimp.so
|
||||
4100755cb6cc6e3b76da20c7e3690e16 SD_ROOT/wz_mini/lib/libalog.so
|
||||
a0d2f47e09ae936c847115ad97c594e3 SD_ROOT/wz_mini/lib/libcallback.so
|
||||
11efb592b989c853d0db65b5aa5e5413 SD_ROOT/wz_mini/lib/libcallback.so
|
||||
3f7f24b71a73f9597b64cda42cd83221 SD_ROOT/wz_mini/lib/modules/3.10.14_v2/modules.order
|
||||
5ef8504ca3fa25445bfd8ae782b94e52 SD_ROOT/wz_mini/lib/modules/3.10.14_v2/kernel/crypto/md4.ko
|
||||
3d1f59ab6fa1987f58ed8b6bc0444582 SD_ROOT/wz_mini/lib/modules/3.10.14_v2/kernel/libcomposite.ko
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern int IMP_AI_DisableHpf();
|
||||
extern int IMP_AI_DisableAgc();
|
||||
@ -19,6 +20,7 @@ extern void set_fs_chn_config_fps();
|
||||
extern void local_sdk_video_init();
|
||||
extern void local_sdk_video_set_fps();
|
||||
extern void local_sdk_video_set_gop();
|
||||
extern void local_sdk_video_set_flip();
|
||||
|
||||
extern void IMP_ISP_EnableTuning();
|
||||
|
||||
@ -39,9 +41,15 @@ extern int IMP_ISP_Tuning_SetSinterStrength();
|
||||
extern int IMP_ISP_Tuning_SetMaxAgain();
|
||||
extern int IMP_ISP_Tuning_SetMaxDgain();
|
||||
extern int IMP_ISP_Tuning_SetBacklightComp();
|
||||
extern int IMP_ISP_Tuning_SetDPStrength();
|
||||
|
||||
extern int IMP_ISP_Tuning_SetISPHflip();
|
||||
extern int IMP_ISP_Tuning_SetISPVflip();
|
||||
|
||||
extern void CommandResponse(int fd, const char *res);
|
||||
|
||||
const char *productv2="/driver/sensor_jxf23.ko";
|
||||
|
||||
|
||||
|
||||
char *imp_Control(int fd, char *tokenPtr) {
|
||||
@ -63,6 +71,7 @@ int sinter_val;
|
||||
int bcomp_val;
|
||||
int again_val;
|
||||
int dgain_val;
|
||||
int dps_val;
|
||||
|
||||
int encChn = 0;
|
||||
int fps_den = 1;
|
||||
@ -88,15 +97,37 @@ int frmRateDen = 1;
|
||||
} else if(!strcmp(p, "aec_on")) {
|
||||
IMP_AI_EnableAec();
|
||||
} else if(!strcmp(p, "flip_mirror")) {
|
||||
IMP_ISP_EnableTuning();
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
IMP_ISP_Tuning_SetISPHflip(0);
|
||||
IMP_ISP_Tuning_SetISPVflip(0);
|
||||
} else {
|
||||
IMP_ISP_Tuning_SetHVFLIP(0);
|
||||
}
|
||||
} else if(!strcmp(p, "flip_vertical")) {
|
||||
IMP_ISP_EnableTuning();
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
IMP_ISP_Tuning_SetISPVflip(0);
|
||||
} else {
|
||||
IMP_ISP_Tuning_SetHVFLIP(1);
|
||||
}
|
||||
} else if(!strcmp(p, "flip_horizontal")) {
|
||||
IMP_ISP_EnableTuning();
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
IMP_ISP_Tuning_SetISPHflip(0);
|
||||
} else {
|
||||
IMP_ISP_Tuning_SetHVFLIP(2);
|
||||
}
|
||||
} else if(!strcmp(p, "flip_normal")) {
|
||||
IMP_ISP_EnableTuning();
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
IMP_ISP_Tuning_SetISPHflip(1);
|
||||
IMP_ISP_Tuning_SetISPVflip(1);
|
||||
} else {
|
||||
IMP_ISP_Tuning_SetHVFLIP(3);
|
||||
}
|
||||
} else if(!strcmp(p, "fps_set")) {
|
||||
//encoder framerate failed, broken
|
||||
//encoder framerate failed
|
||||
p = strtok_r(NULL, " \t\r\n", &tokenPtr);
|
||||
// fps_val = 20;
|
||||
if(p) fps_val = atoi(p);
|
||||
@ -104,7 +135,7 @@ int frmRateDen = 1;
|
||||
// IMP_ISP_EnableTuning();
|
||||
// IMP_ISP_Tuning_SetSensorFPS(fps_val, fps_den);
|
||||
|
||||
// set_fs_chn_config_fps(encChn, fps_val);
|
||||
set_fs_chn_config_fps(encChn, fps_val);
|
||||
|
||||
set_video_max_fps(fps_val);
|
||||
local_sdk_video_set_fps(fps_val);
|
||||
@ -145,20 +176,32 @@ int frmRateDen = 1;
|
||||
} else if(!strcmp(p, "tune_aeitmax")) {
|
||||
p = strtok_r(NULL, " \t\r\n", &tokenPtr);
|
||||
if(p) aeitmax_val = atoi(p);
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
return "not supported on v2";
|
||||
} else {
|
||||
IMP_ISP_EnableTuning();
|
||||
IMP_ISP_Tuning_SetAe_IT_MAX(aeitmax_val);
|
||||
}
|
||||
|
||||
} else if(!strcmp(p, "tune_dpc_strength")) {
|
||||
p = strtok_r(NULL, " \t\r\n", &tokenPtr);
|
||||
if(p) dpc_val = atoi(p);
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
return "not supported on v2";
|
||||
} else {
|
||||
IMP_ISP_EnableTuning();
|
||||
IMP_ISP_Tuning_SetDPC_Strength(dpc_val);
|
||||
}
|
||||
|
||||
} else if(!strcmp(p, "tune_drc_strength")) {
|
||||
p = strtok_r(NULL, " \t\r\n", &tokenPtr);
|
||||
if(p) drc_val = atoi(p);
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
return "not supported on v2";
|
||||
} else {
|
||||
IMP_ISP_EnableTuning();
|
||||
IMP_ISP_Tuning_SetDRC_Strength(drc_val);
|
||||
}
|
||||
|
||||
} else if(!strcmp(p, "tune_hilightdepress")) {
|
||||
p = strtok_r(NULL, " \t\r\n", &tokenPtr);
|
||||
@ -193,9 +236,22 @@ int frmRateDen = 1;
|
||||
} else if(!strcmp(p, "tune_backlightcomp")) {
|
||||
p = strtok_r(NULL, " \t\r\n", &tokenPtr);
|
||||
if(p) bcomp_val = atoi(p);
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
return "not supported on v2";
|
||||
} else {
|
||||
IMP_ISP_EnableTuning();
|
||||
IMP_ISP_Tuning_SetBacklightComp(bcomp_val);
|
||||
}
|
||||
|
||||
} else if(!strcmp(p, "tune_dps")) {
|
||||
p = strtok_r(NULL, " \t\r\n", &tokenPtr);
|
||||
if(p) dps_val = atoi(p);
|
||||
if( access( productv2, F_OK ) != -1 ) {
|
||||
IMP_ISP_EnableTuning();
|
||||
IMP_ISP_Tuning_SetDPStrength(dps_val);
|
||||
} else {
|
||||
return "not supported on v3";
|
||||
}
|
||||
} else {
|
||||
return "error";
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user