From da0d29e4ab5b828300e549ad21d8d30476047197 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Tue, 22 Jun 2010 17:32:19 +0000 Subject: [PATCH] Merge with v2 branch --- codec/convert.c | 4 ++-- codec/image_to_j2k.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/codec/convert.c b/codec/convert.c index 631cae05..52aa2310 100644 --- a/codec/convert.c +++ b/codec/convert.c @@ -2121,7 +2121,7 @@ int imagetoraw(opj_image_t * image, const char *outfile) for (line = 0; line < h; line++) { for(row = 0; row < w; row++) { unsigned char temp; - curr = (signed short int) (*ptr & mask); + curr = (signed short int) (*ptr & mask); temp = (unsigned char) (curr >> 8); fwrite(&temp, 1, 1, rawFile); temp = (unsigned char) curr; @@ -2138,7 +2138,7 @@ int imagetoraw(opj_image_t * image, const char *outfile) for (line = 0; line < h; line++) { for(row = 0; row < w; row++) { unsigned char temp; - curr = (unsigned short int) (*ptr & mask); + curr = (unsigned short int) (*ptr & mask); temp = (unsigned char) (curr >> 8); fwrite(&temp, 1, 1, rawFile); temp = (unsigned char) curr; diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index 818c6b87..7acaed07 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -522,6 +522,8 @@ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_ } parameters->numpocs = initialise_4K_poc(parameters->POC,parameters->numresolution); break; + default : + break; } switch (parameters->cp_cinema){ @@ -565,6 +567,8 @@ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_ } parameters->max_comp_size = COMP_48_CS; break; + default: + break; } parameters->cp_disto_alloc = 1; } @@ -1060,7 +1064,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, int hprot, pprot, sens, addr, size, range; /* we need to enable indexing */ - if (!indexfilename || !strcmp(indexfilename, "")) { + if (!indexfilename || !*indexfilename) { strncpy(indexfilename, JPWL_PRIVATEINDEX_NAME, OPJ_PATH_LEN); } @@ -1128,7 +1132,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, /* search packet error protection method */ if (*token == 'p') { - static int pack = 0, tile = 0, packspec = 0/*, lastpackno = 0*/; + static int pack = 0, tile = 0, packspec = 0; pprot = 1; /* predefined method */ @@ -1284,7 +1288,6 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, /* search addressing size */ if (*token == 'a') { - /*static int tile = 0, tilespec = 0, lasttileno = 0*/; addr = 0; /* predefined: auto */ @@ -1310,7 +1313,6 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, /* search sensitivity size */ if (*token == 'z') { - /*static int tile = 0, tilespec = 0, lasttileno = 0;*/ size = 1; /* predefined: 1 byte */ @@ -1336,7 +1338,6 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, /* search range method */ if (*token == 'g') { - /*static int tile = 0, tilespec = 0, lasttileno = 0;*/ range = 0; /* predefined: 0 (packet) */