fprintf(stdout," Indicate multiple modes by adding their values. \n");\r
fprintf(stdout," ex: RESTART(4) + RESET(2) + SEGMARK(32) = -M 38\n");\r
fprintf(stdout,"\n");\r
+ fprintf(stdout,"-TP : devide packets of every tile into tile-parts (-TP R) [R, L, C]\n");\r
+ fprintf(stdout,"\n");\r
fprintf(stdout,"-x : create an index file *.Idx (-x index_name.Idx) \n");\r
fprintf(stdout,"\n");\r
fprintf(stdout,"-ROI : c=%%d,U=%%d : quantization indices upshifted \n");\r
fprintf(stdout,"\n");\r
fprintf(stdout,"-I : use the irreversible DWT 9-7 (-I) \n");\r
fprintf(stdout,"\n");\r
+ fprintf(stdout,"-jpip : write jpip codestream index box in JP2 output file\n");\r
+ fprintf(stdout," NOTICE: currently supports only RPCL order\n");\r
+ fprintf(stdout,"\n");\r
/* UniPG>> */\r
#ifdef USE_JPWL\r
fprintf(stdout,"-W : adoption of JPWL (Part 11) capabilities (-W params)\n");\r
}\r
\r
void cinema_parameters(opj_cparameters_t *parameters){\r
- parameters->tile_size_on = false;\r
+ parameters->tile_size_on = OPJ_FALSE;\r
parameters->cp_tdx=1;\r
parameters->cp_tdy=1;\r
\r
{"cinema2K",REQ_ARG, NULL ,'w'},\r
{"cinema4K",NO_ARG, NULL ,'y'},\r
{"ImgDir",REQ_ARG, NULL ,'z'},\r
- {"TP",REQ_ARG, NULL ,'v'},\r
+ {"TP",REQ_ARG, NULL ,'u'},\r
{"SOP",NO_ARG, NULL ,'S'},\r
{"EPH",NO_ARG, NULL ,'E'},\r
{"OutFor",REQ_ARG, NULL ,'O'},\r
{"POC",REQ_ARG, NULL ,'P'},\r
{"ROI",REQ_ARG, NULL ,'R'},\r
+ {"jpip",NO_ARG, NULL, 'J'}\r
};\r
\r
/* parse the command line */\r
/* UniPG>> */\r
- const char optlist[] = "i:o:hr:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:"\r
+ const char optlist[] = "i:o:hr:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:u:J"\r
#ifdef USE_JPWL\r
"W:"\r
#endif /* USE_JPWL */\r
case 't': /* tiles */\r
{\r
sscanf(opj_optarg, "%d,%d", ¶meters->cp_tdx, ¶meters->cp_tdy);\r
- parameters->tile_size_on = true;\r
+ parameters->tile_size_on = OPJ_TRUE;\r
}\r
break;\r
\r
\r
/* ------------------------------------------------------ */\r
\r
- case 'v': /* Tile part generation*/\r
+ case 'u': /* Tile part generation*/\r
{\r
parameters->tp_flag = opj_optarg[0];\r
parameters->tp_on = 1;\r
break;\r
#endif /* USE_JPWL */\r
/* <<UniPG */\r
-\r
+/* ------------------------------------------------------ */\r
+ \r
+ case 'J': /* jpip on */\r
+ {\r
+ parameters->jpip_on = OPJ_TRUE;\r
+ }\r
+ break;\r
/* ------------------------------------------------------ */\r
\r
default:\r
jbyte *jbBody;\r
jshort *jsBody;\r
jint *jiBody;\r
- boolean isCopy;\r
+ jboolean isCopy;\r
\r
// Image width, height and depth\r
fid = (*env)->GetFieldID(env, cls,"width", "I");\r
JNIEXPORT jlong JNICALL Java_org_openJpeg_OpenJPEGJavaEncoder_internalEncodeImageToJ2K(JNIEnv *env, jobject obj, jobjectArray javaParameters) {\r
int argc; /* To simulate the command line parameters (taken from the javaParameters variable) and be able to re-use the */\r
char **argv; /* 'parse_cmdline_decoder' method taken from the j2k_to_image project */\r
- bool bSuccess;\r
+ opj_bool bSuccess;\r
opj_cparameters_t parameters; /* compression parameters */\r
img_fol_t img_fol;\r
opj_event_mgr_t event_mgr; /* event manager */\r
if (parameters.cod_format == J2K_CFMT) { /* J2K format output */\r
cinfo = opj_create_compress(CODEC_J2K);\r
} else { /* JP2 format output */\r
- cinfo = opj_create_compress(CODEC_JP2);\r
+ cinfo = opj_create_compress(CODEC_JP2);\r
}\r
/* catch events using our callbacks and give a local context */\r
opj_set_event_mgr((opj_common_ptr)cinfo, &event_mgr, &msgErrorCallback_vars);\r