Skip to content
Snippets Groups Projects
Commit 0568eff5 authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Added an argument to cam_model in hpvm-cava

parent 2c80d818
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ typedef struct __attribute__((__packed__)) {
} RootIn;
typedef enum _argnum {
CAM_MODEL,
RAW_IMAGE_BIN,
OUTPUT_IMAGE_BIN,
NUM_REQUIRED_ARGS,
......@@ -67,7 +68,7 @@ typedef struct _arguments {
} arguments;
static char prog_doc[] = "\nCamera pipeline on gem5-Aladdin.\n";
static char args_doc[] = "path/to/raw-image-binary path/to/output-image-binary";
static char args_doc[] = "path/to/cam-model path/to/raw-image-binary path/to/output-image-binary";
static struct argp_option options[] = {
{"num-inputs", 'n', "N", 0, "Number of input images"},
{0},
......@@ -724,14 +725,14 @@ int main(int argc, char *argv[]) {
*transform_out, *gamut_out;
float *TsTw, *ctrl_pts, *weights, *coefs, *tone_map, *l2_dist;
TsTw = get_TsTw("cam_models/NikonD7000/", wb_index);
TsTw = get_TsTw(args.args[CAM_MODEL], wb_index);
float *trans = transpose_mat(TsTw, CHAN_SIZE, CHAN_SIZE);
free(TsTw);
TsTw = trans;
ctrl_pts = get_ctrl_pts("cam_models/NikonD7000/", num_ctrl_pts);
weights = get_weights("cam_models/NikonD7000/", num_ctrl_pts);
coefs = get_coefs("cam_models/NikonD7000/", num_ctrl_pts);
tone_map = get_tone_map("cam_models/NikonD7000/");
ctrl_pts = get_ctrl_pts(args.args[CAM_MODEL], num_ctrl_pts);
weights = get_weights(args.args[CAM_MODEL], num_ctrl_pts);
coefs = get_coefs(args.args[CAM_MODEL], num_ctrl_pts);
tone_map = get_tone_map(args.args[CAM_MODEL]);
input_scaled = (float *)malloc_aligned(bytes_fimage);
result_scaled = (float *)malloc_aligned(bytes_fimage);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment