|
@@ -390,7 +390,7 @@ postprocess_internal(char *burst_dir, char *target_dir)
|
|
|
}
|
|
|
stacker_t *stacker = stacker_create();
|
|
|
while (burst_size--) {
|
|
|
- printf("DNG: %s\n", namelist[burst_size]->d_name);
|
|
|
+ fprintf(stderr, "DEBAYER %s\n", namelist[burst_size]->d_name);
|
|
|
snprintf(path, sizeof(path), "%s/%s", burst_dir, namelist[burst_size]->d_name);
|
|
|
snprintf(outpath, sizeof(outpath), "%s.%d.jpg", target_dir, burst_size);
|
|
|
if (first) {
|
|
@@ -399,12 +399,15 @@ postprocess_internal(char *burst_dir, char *target_dir)
|
|
|
exif = create_exif(imagedata);
|
|
|
}
|
|
|
decoded = debayer_file(path);
|
|
|
- stacker_add_image(stacker, decoded->data, decoded->width, decoded->height);
|
|
|
+ fprintf(stderr, "JPEG %s\n", namelist[burst_size]->d_name);
|
|
|
save_jpeg(outpath, decoded, 90, exif);
|
|
|
+ fprintf(stderr, "CONVERG %s\n", namelist[burst_size]->d_name);
|
|
|
+ stacker_add_image(stacker, decoded->data, decoded->width, decoded->height);
|
|
|
free(namelist[burst_size]);
|
|
|
}
|
|
|
free(namelist);
|
|
|
|
|
|
+ fprintf(stderr, "STACK stacked.jpg\n");
|
|
|
// Convert opencv result to a libraw struct and feed it in the jpeg encoder with the original exif data
|
|
|
char *stacked = stacker_get_result(stacker);
|
|
|
int result_size = decoded->width * decoded->height * 3;
|
|
@@ -417,6 +420,7 @@ postprocess_internal(char *burst_dir, char *target_dir)
|
|
|
memmove(stacked_data->data, stacked, result_size);
|
|
|
|
|
|
// Save the final file
|
|
|
- snprintf(stackpath, sizeof(stackpath), "%s.stacked.jpeg", target_dir);
|
|
|
+ fprintf(stderr, "JPEG stacked.jpg\n");
|
|
|
+ snprintf(stackpath, sizeof(stackpath), "%s.stacked.jpg", target_dir);
|
|
|
save_jpeg(stackpath, stacked_data, 90, exif);
|
|
|
}
|