switch field from signed int to unsigned int
This commit is contained in:
parent
4735d941d9
commit
28b9522f6e
|
@ -914,10 +914,10 @@ static int parse_cmdline_encoder(int argc, char **argv,
|
|||
|
||||
/* ----------------------------------------------------- */
|
||||
case 'X': { /* target bitdepth */
|
||||
int target_bitdepth = 0;
|
||||
unsigned int target_bitdepth = 0;
|
||||
char *s = opj_optarg;
|
||||
sscanf(s, "%d", &target_bitdepth);
|
||||
if (target_bitdepth <= 0) {
|
||||
sscanf(s, "%u", &target_bitdepth);
|
||||
if (target_bitdepth == 0) {
|
||||
fprintf(stderr, "Target bitdepth must be at least 1 bit.\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -756,7 +756,7 @@ void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t
|
|||
parameters->tp_on = 0;
|
||||
parameters->decod_format = -1;
|
||||
parameters->cod_format = -1;
|
||||
parameters->target_bitdepth = -1;
|
||||
parameters->target_bitdepth = 0;
|
||||
parameters->tcp_rates[0] = 0;
|
||||
parameters->tcp_numlayers = 0;
|
||||
parameters->cp_disto_alloc = 0;
|
||||
|
|
|
@ -466,7 +466,7 @@ typedef struct opj_cparameters {
|
|||
/** output file format 0: J2K, 1: JP2, 2: JPT */
|
||||
int cod_format;
|
||||
/** desired bitdepth from input file */
|
||||
int target_bitdepth;
|
||||
unsigned int target_bitdepth;
|
||||
/*@}*/
|
||||
|
||||
/* UniPG>> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */
|
||||
|
|
Loading…
Reference in New Issue