/**
sample error callback expecting a FILE* client object
*/
-void error_callback_file(const char *msg, void *client_data) {
+static void error_callback_file(const char *msg, void *client_data) {
FILE *stream = (FILE*)client_data;
fprintf(stream, "[ERROR] %s", msg);
}
/**
sample warning callback expecting a FILE* client object
*/
-void warning_callback_file(const char *msg, void *client_data) {
+static void warning_callback_file(const char *msg, void *client_data) {
FILE *stream = (FILE*)client_data;
fprintf(stream, "[WARNING] %s", msg);
}
/**
sample error debug callback expecting no client object
*/
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
(void)client_data;
fprintf(stdout, "[ERROR] %s", msg);
}
/**
sample warning debug callback expecting no client object
*/
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
(void)client_data;
fprintf(stdout, "[WARNING] %s", msg);
}
/**
sample debug callback expecting no client object
*/
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
(void)client_data;
fprintf(stdout, "[INFO] %s", msg);
}
fprintf(stdout, "Encoding random values -> keep in mind that this is very hard to compress\n");
for (i=0;i<l_data_size;++i) {
- l_data[i] = i; //rand();
+ l_data[i] = i; /*rand();*/
}
opj_set_default_encoder_parameters(&l_param);
++l_current_param_ptr;
}
- // should we do j2k or jp2 ?
+ /* should we do j2k or jp2 ?*/
len = strlen( output_file );
if( strcmp( output_file + len - 4, ".jp2" ) == 0 )
{
- l_codec = opj_create_compress_v2(CODEC_JP2);
+ l_codec = opj_create_compress(CODEC_JP2);
}
else
{
- l_codec = opj_create_compress_v2(CODEC_J2K);
+ l_codec = opj_create_compress(CODEC_J2K);
}
if (!l_codec) {
return 1;
l_image->y1 = image_height;
l_image->color_space = CLRSPC_SRGB;
- if (! opj_setup_encoder_v2(l_codec,&l_param,l_image)) {
+ if (! opj_setup_encoder(l_codec,&l_param,l_image)) {
fprintf(stderr, "ERROR -> test_tile_encoder: failed to setup the codec!\n");
opj_destroy_codec(l_codec);
opj_image_destroy(l_image);
free(l_data);
- // Print profiling
- //PROFPRINT();
+ /* Print profiling*/
+ /*PROFPRINT();*/
return 0;
}