|
@@ -567,7 +567,7 @@ process_aaa()
|
|
struct focus_stats stats;
|
|
struct focus_stats stats;
|
|
focus_stats(&stats, center, width, height);
|
|
focus_stats(&stats, center, width, height);
|
|
auto_focus_step(&stats);
|
|
auto_focus_step(&stats);
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
if (auto_exposure) {
|
|
if (auto_exposure) {
|
|
int direction = state_proc.stats.exposure;
|
|
int direction = state_proc.stats.exposure;
|
|
@@ -1085,6 +1085,58 @@ save_dng(const uint8_t *image, char *fname, int count)
|
|
libdng_set_exposure_program(&dng, LIBDNG_EXPOSUREPROGRAM_MANUAL);
|
|
libdng_set_exposure_program(&dng, LIBDNG_EXPOSUREPROGRAM_MANUAL);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ libdng_set_color_matrix_1(
|
|
|
|
+ &dng,
|
|
|
|
+ state_proc.calibration.color_matrix_1[0],
|
|
|
|
+ state_proc.calibration.color_matrix_1[1],
|
|
|
|
+ state_proc.calibration.color_matrix_1[2],
|
|
|
|
+ state_proc.calibration.color_matrix_1[3],
|
|
|
|
+ state_proc.calibration.color_matrix_1[4],
|
|
|
|
+ state_proc.calibration.color_matrix_1[5],
|
|
|
|
+ state_proc.calibration.color_matrix_1[6],
|
|
|
|
+ state_proc.calibration.color_matrix_1[7],
|
|
|
|
+ state_proc.calibration.color_matrix_1[8]
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ libdng_set_color_matrix_2(
|
|
|
|
+ &dng,
|
|
|
|
+ state_proc.calibration.color_matrix_2[0],
|
|
|
|
+ state_proc.calibration.color_matrix_2[1],
|
|
|
|
+ state_proc.calibration.color_matrix_2[2],
|
|
|
|
+ state_proc.calibration.color_matrix_2[3],
|
|
|
|
+ state_proc.calibration.color_matrix_2[4],
|
|
|
|
+ state_proc.calibration.color_matrix_2[5],
|
|
|
|
+ state_proc.calibration.color_matrix_2[6],
|
|
|
|
+ state_proc.calibration.color_matrix_2[7],
|
|
|
|
+ state_proc.calibration.color_matrix_2[8]
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ libdng_set_forward_matrix_1(
|
|
|
|
+ &dng,
|
|
|
|
+ state_proc.calibration.forward_matrix_1[0],
|
|
|
|
+ state_proc.calibration.forward_matrix_1[1],
|
|
|
|
+ state_proc.calibration.forward_matrix_1[2],
|
|
|
|
+ state_proc.calibration.forward_matrix_1[3],
|
|
|
|
+ state_proc.calibration.forward_matrix_1[4],
|
|
|
|
+ state_proc.calibration.forward_matrix_1[5],
|
|
|
|
+ state_proc.calibration.forward_matrix_1[6],
|
|
|
|
+ state_proc.calibration.forward_matrix_1[7],
|
|
|
|
+ state_proc.calibration.forward_matrix_1[8]
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ libdng_set_forward_matrix_2(
|
|
|
|
+ &dng,
|
|
|
|
+ state_proc.calibration.forward_matrix_2[0],
|
|
|
|
+ state_proc.calibration.forward_matrix_2[1],
|
|
|
|
+ state_proc.calibration.forward_matrix_2[2],
|
|
|
|
+ state_proc.calibration.forward_matrix_2[3],
|
|
|
|
+ state_proc.calibration.forward_matrix_2[4],
|
|
|
|
+ state_proc.calibration.forward_matrix_2[5],
|
|
|
|
+ state_proc.calibration.forward_matrix_2[6],
|
|
|
|
+ state_proc.calibration.forward_matrix_2[7],
|
|
|
|
+ state_proc.calibration.forward_matrix_2[8]
|
|
|
|
+ );
|
|
|
|
+
|
|
//printf("Writing frame to %s, %d x %d\n", fname, state_proc.mode->width, state_proc.mode->height);
|
|
//printf("Writing frame to %s, %d x %d\n", fname, state_proc.mode->width, state_proc.mode->height);
|
|
libdng_write(&dng,
|
|
libdng_write(&dng,
|
|
fname,
|
|
fname,
|