summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-11-15 13:38:35 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-11-15 13:38:35 +0000
commite212154d8d43ec583cb6dc8f963b97988a54c11d (patch)
tree074b1b8b459ce72933177247b3d9a891fa00e5c2 /tests
parentec0fe091380c2de75584fdfc3d914eee5b89e731 (diff)
[trunk]extend last commits to apps
Diffstat (limited to 'tests')
-rw-r--r--tests/comparePGXimages.c6
-rw-r--r--tests/j2k_random_tile_access.c6
-rw-r--r--tests/test_tile_decoder.c6
-rw-r--r--tests/test_tile_encoder.c14
-rw-r--r--tests/unit/testempty1.c6
-rw-r--r--tests/unit/testempty2.c8
6 files changed, 23 insertions, 23 deletions
diff --git a/tests/comparePGXimages.c b/tests/comparePGXimages.c
index be741141..13cbd3cb 100644
--- a/tests/comparePGXimages.c
+++ b/tests/comparePGXimages.c
@@ -446,7 +446,7 @@ opj_image_t* readImageFromFilePGX(char* filename, int nbFilenamePGX, char *separ
free(filenameComponentPGX);
}
- image = opj_image_create(nbFilenamePGX, param_image_read, CLRSPC_UNSPECIFIED);
+ image = opj_image_create(nbFilenamePGX, param_image_read, OPJ_CLRSPC_UNSPECIFIED);
for (it_file = 0; it_file < nbFilenamePGX; it_file++)
{
/* Copy data into output image and free memory*/
@@ -480,7 +480,7 @@ int imageToPNG(const opj_image_t* image, const char* filename, int num_comp_sele
param_image_write.prec = image->comps[num_comp_select].prec;
param_image_write.sgnd = image->comps[num_comp_select].sgnd;
- image_write = opj_image_create(1, &param_image_write, CLRSPC_GRAY);
+ image_write = opj_image_create(1, &param_image_write, OPJ_CLRSPC_GRAY);
memcpy(image_write->comps->data, image->comps[num_comp_select].data, param_image_write.h * param_image_write.w * sizeof(int));
imagetopng(image_write, filename);
@@ -678,7 +678,7 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
- imageDiff = opj_image_create(imageBase->numcomps, param_image_diff, CLRSPC_UNSPECIFIED);
+ imageDiff = opj_image_create(imageBase->numcomps, param_image_diff, OPJ_CLRSPC_UNSPECIFIED);
/* Free memory*/
free(param_image_diff);
diff --git a/tests/j2k_random_tile_access.c b/tests/j2k_random_tile_access.c
index f87c36ea..23420f4e 100644
--- a/tests/j2k_random_tile_access.c
+++ b/tests/j2k_random_tile_access.c
@@ -196,19 +196,19 @@ int main(int argc, char **argv)
case J2K_CFMT: /* JPEG-2000 codestream */
{
/* Get a decoder handle */
- l_codec = opj_create_decompress(CODEC_J2K);
+ l_codec = opj_create_decompress(OPJ_CODEC_J2K);
break;
}
case JP2_CFMT: /* JPEG 2000 compressed image data */
{
/* Get a decoder handle */
- l_codec = opj_create_decompress(CODEC_JP2);
+ l_codec = opj_create_decompress(OPJ_CODEC_JP2);
break;
}
case JPT_CFMT: /* JPEG 2000, JPIP */
{
/* Get a decoder handle */
- l_codec = opj_create_decompress(CODEC_JPT);
+ l_codec = opj_create_decompress(OPJ_CODEC_JPT);
break;
}
default:
diff --git a/tests/test_tile_decoder.c b/tests/test_tile_decoder.c
index 6691cd4e..81f791cb 100644
--- a/tests/test_tile_decoder.c
+++ b/tests/test_tile_decoder.c
@@ -185,7 +185,7 @@ int main (int argc, char *argv[])
OPJ_UINT32 l_max_data_size = 1000;
OPJ_UINT32 l_tile_index;
OPJ_BYTE * l_data = (OPJ_BYTE *) malloc(1000);
- opj_bool l_go_on = OPJ_TRUE;
+ OPJ_BOOL l_go_on = OPJ_TRUE;
OPJ_INT32 l_tile_x0=0, l_tile_y0=0 ;
OPJ_UINT32 l_tile_width=0, l_tile_height=0, l_nb_tiles_x=0, l_nb_tiles_y=0, l_nb_comps=0 ;
OPJ_INT32 l_current_tile_x0,l_current_tile_y0,l_current_tile_x1,l_current_tile_y1;
@@ -256,13 +256,13 @@ int main (int argc, char *argv[])
case J2K_CFMT: /* JPEG-2000 codestream */
{
/* Get a decoder handle */
- l_codec = opj_create_decompress(CODEC_J2K);
+ l_codec = opj_create_decompress(OPJ_CODEC_J2K);
break;
}
case JP2_CFMT: /* JPEG 2000 compressed image data */
{
/* Get a decoder handle */
- l_codec = opj_create_decompress(CODEC_JP2);
+ l_codec = opj_create_decompress(OPJ_CODEC_JP2);
break;
}
default:
diff --git a/tests/test_tile_encoder.c b/tests/test_tile_encoder.c
index a405d86e..22ecb348 100644
--- a/tests/test_tile_encoder.c
+++ b/tests/test_tile_encoder.c
@@ -175,7 +175,7 @@ int main (int argc, char *argv[])
l_param.irreversible = irreversible;
/* do not bother with mct, the rsiz is set when calling opj_set_MCT*/
- /*l_param.cp_rsiz = STD_RSIZ;*/
+ /*l_param.cp_rsiz = OPJ_STD_RSIZ;*/
/* no cinema */
/*l_param.cp_cinema = 0;*/
@@ -203,8 +203,8 @@ int main (int argc, char *argv[])
l_param.numresolution = 6;
/** progression order to use*/
- /** LRCP, RLCP, RPCL, PCRL, CPRL */
- l_param.prog_order = LRCP;
+ /** OPJ_LRCP, OPJ_RLCP, OPJ_RPCL, PCRL, CPRL */
+ l_param.prog_order = OPJ_LRCP;
/** no "region" of interest, more precisally component */
/* l_param.roi_compno = -1; */
@@ -244,11 +244,11 @@ int main (int argc, char *argv[])
len = strlen( output_file );
if( strcmp( output_file + len - 4, ".jp2" ) == 0 )
{
- l_codec = opj_create_compress(CODEC_JP2);
+ l_codec = opj_create_compress(OPJ_CODEC_JP2);
}
else
{
- l_codec = opj_create_compress(CODEC_J2K);
+ l_codec = opj_create_compress(OPJ_CODEC_J2K);
}
if (!l_codec) {
return 1;
@@ -259,7 +259,7 @@ int main (int argc, char *argv[])
opj_set_warning_handler(l_codec, warning_callback,00);
opj_set_error_handler(l_codec, error_callback,00);
- l_image = opj_image_tile_create(num_comps,l_params,CLRSPC_SRGB);
+ l_image = opj_image_tile_create(num_comps,l_params,OPJ_CLRSPC_SRGB);
if (! l_image) {
opj_destroy_codec(l_codec);
return 1;
@@ -269,7 +269,7 @@ int main (int argc, char *argv[])
l_image->y0 = 0;
l_image->x1 = image_width;
l_image->y1 = image_height;
- l_image->color_space = CLRSPC_SRGB;
+ l_image->color_space = OPJ_CLRSPC_SRGB;
if (! opj_setup_encoder(l_codec,&l_param,l_image)) {
fprintf(stderr, "ERROR -> test_tile_encoder: failed to setup the codec!\n");
diff --git a/tests/unit/testempty1.c b/tests/unit/testempty1.c
index 110b8c6b..add522a6 100644
--- a/tests/unit/testempty1.c
+++ b/tests/unit/testempty1.c
@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
{
const char * v = opj_version();
- const OPJ_COLOR_SPACE color_space = CLRSPC_GRAY;
+ const OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY;
int numcomps = 1;
int i;
int image_width = 256;
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
opj_image_cmptparm_t cmptparm;
opj_image_t *image;
opj_codec_t* l_codec = 00;
- opj_bool bSuccess;
+ OPJ_BOOL bSuccess;
FILE *f;
opj_stream_t *l_stream = 00;
(void)argc;
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
opj_set_warning_handler(l_codec, warning_callback,00);
opj_set_error_handler(l_codec, error_callback,00);
- l_codec = opj_create_compress(CODEC_J2K);
+ l_codec = opj_create_compress(OPJ_CODEC_J2K);
opj_set_info_handler(l_codec, info_callback,00);
opj_set_warning_handler(l_codec, warning_callback,00);
opj_set_error_handler(l_codec, error_callback,00);
diff --git a/tests/unit/testempty2.c b/tests/unit/testempty2.c
index 6e317755..47ef4cc2 100644
--- a/tests/unit/testempty2.c
+++ b/tests/unit/testempty2.c
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
{
const char * v = opj_version();
- const OPJ_COLOR_SPACE color_space = CLRSPC_GRAY;
+ const OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY;
int numcomps = 1;
int i;
int image_width = 256;
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
opj_image_cmptparm_t cmptparm;
opj_image_t *image;
opj_codec_t* l_codec = 00;
- opj_bool bSuccess;
+ OPJ_BOOL bSuccess;
FILE *f;
opj_stream_t *l_stream = 00;
(void)argc;
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
opj_set_warning_handler(l_codec, warning_callback,00);
opj_set_error_handler(l_codec, error_callback,00);
- l_codec = opj_create_compress(CODEC_J2K);
+ l_codec = opj_create_compress(OPJ_CODEC_J2K);
opj_set_info_handler(l_codec, info_callback,00);
opj_set_warning_handler(l_codec, warning_callback,00);
opj_set_error_handler(l_codec, error_callback,00);
@@ -141,7 +141,7 @@ int main(int argc, char *argv[])
opj_dparameters_t dparameters;
assert( fsrc );
- d_codec = opj_create_decompress(CODEC_J2K);
+ d_codec = opj_create_decompress(OPJ_CODEC_J2K);
opj_set_info_handler(d_codec, info_callback,00);
opj_set_warning_handler(d_codec, warning_callback,00);
opj_set_error_handler(d_codec, error_callback,00);