|
@@ -26,6 +26,7 @@ usage(char *name)
|
|
fprintf(stderr, " -i, --iso speed Set the ISO speed rating\n");
|
|
fprintf(stderr, " -i, --iso speed Set the ISO speed rating\n");
|
|
fprintf(stderr, " -f, --fnumber fnumber Set the aperture as f/value\n");
|
|
fprintf(stderr, " -f, --fnumber fnumber Set the aperture as f/value\n");
|
|
fprintf(stderr, " -l, --focal-length length,crop Set the aperture as f/value\n");
|
|
fprintf(stderr, " -l, --focal-length length,crop Set the aperture as f/value\n");
|
|
|
|
+ fprintf(stderr, " -F, --frame-rate framerate Set the CinemaDNG framerate\n");
|
|
}
|
|
}
|
|
|
|
|
|
int
|
|
int
|
|
@@ -52,6 +53,7 @@ main(int argc, char *argv[])
|
|
float exposure_time = 0;
|
|
float exposure_time = 0;
|
|
uint32_t iso = 0;
|
|
uint32_t iso = 0;
|
|
float fnumber = 0.0f;
|
|
float fnumber = 0.0f;
|
|
|
|
+ float framerate = 0.0f;
|
|
float focal_length = 0.0f;
|
|
float focal_length = 0.0f;
|
|
float crop_factor = 1.0f;
|
|
float crop_factor = 1.0f;
|
|
|
|
|
|
@@ -70,10 +72,11 @@ main(int argc, char *argv[])
|
|
{"iso", required_argument, NULL, 'i'},
|
|
{"iso", required_argument, NULL, 'i'},
|
|
{"fnumber", required_argument, NULL, 'f'},
|
|
{"fnumber", required_argument, NULL, 'f'},
|
|
{"focal-length", required_argument, NULL, 'l'},
|
|
{"focal-length", required_argument, NULL, 'l'},
|
|
|
|
+ {"frame-rate", required_argument, NULL, 'F'},
|
|
{"help", no_argument, NULL, 'H'},
|
|
{"help", no_argument, NULL, 'H'},
|
|
};
|
|
};
|
|
int option_index = 0;
|
|
int option_index = 0;
|
|
- while ((c = getopt_long(argc, argv, "w:h:p:o:m:s:c:n:b:e:t:i:f:l:", long_options, &option_index)) != -1) {
|
|
|
|
|
|
+ while ((c = getopt_long(argc, argv, "w:h:p:o:m:s:c:n:b:e:t:i:f:l:F:", long_options, &option_index)) != -1) {
|
|
switch (c) {
|
|
switch (c) {
|
|
case 'w':
|
|
case 'w':
|
|
val = strtol(optarg, &end, 10);
|
|
val = strtol(optarg, &end, 10);
|
|
@@ -131,6 +134,9 @@ main(int argc, char *argv[])
|
|
case 'f':
|
|
case 'f':
|
|
fnumber = strtof(optarg, &end);
|
|
fnumber = strtof(optarg, &end);
|
|
break;
|
|
break;
|
|
|
|
+ case 'F':
|
|
|
|
+ framerate = strtof(optarg, &end);
|
|
|
|
+ break;
|
|
case 'l':
|
|
case 'l':
|
|
val = sscanf(optarg, "%f,%f", &focal_length, &crop_factor);
|
|
val = sscanf(optarg, "%f,%f", &focal_length, &crop_factor);
|
|
if (val != 2 && val != 1) {
|
|
if (val != 2 && val != 1) {
|
|
@@ -218,6 +224,9 @@ main(int argc, char *argv[])
|
|
if (focal_length > 0) {
|
|
if (focal_length > 0) {
|
|
libdng_set_focal_length(&info, focal_length, crop_factor);
|
|
libdng_set_focal_length(&info, focal_length, crop_factor);
|
|
}
|
|
}
|
|
|
|
+ if (framerate > 0) {
|
|
|
|
+ libdng_set_frame_rate(&info, framerate);
|
|
|
|
+ }
|
|
|
|
|
|
printf("Reading %s...\n", argv[optind]);
|
|
printf("Reading %s...\n", argv[optind]);
|
|
FILE *src = fopen(argv[optind], "r");
|
|
FILE *src = fopen(argv[optind], "r");
|