[trunk] Remove some warnings about missing prototypes (gcc)
This commit is contained in:
parent
d6bcb8b7e0
commit
98682e1073
|
@ -2921,7 +2921,7 @@ opj_image_t* rawtoimage(const char *filename, opj_cparameters_t *parameters, raw
|
||||||
return rawtoimage_common(filename, parameters, raw_cp, OPJ_TRUE);
|
return rawtoimage_common(filename, parameters, raw_cp, OPJ_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int imagetoraw_common(opj_image_t * image, const char *outfile, opj_bool big_endian)
|
static int imagetoraw_common(opj_image_t * image, const char *outfile, opj_bool big_endian)
|
||||||
{
|
{
|
||||||
FILE *rawFile = NULL;
|
FILE *rawFile = NULL;
|
||||||
size_t res;
|
size_t res;
|
||||||
|
|
|
@ -84,8 +84,8 @@ typedef struct img_folder{
|
||||||
float *rates;
|
float *rates;
|
||||||
}img_fol_t;
|
}img_fol_t;
|
||||||
|
|
||||||
void encode_help_display(void) {
|
static void encode_help_display(void) {
|
||||||
fprintf(stdout,"HELP for image_to_j2k\n----\n\n");
|
fprintf(stdout,"HELP for opj_compress\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
|
||||||
/* UniPG>> */
|
/* UniPG>> */
|
||||||
|
@ -325,7 +325,7 @@ void encode_help_display(void) {
|
||||||
fprintf(stdout,"TotalDisto\n\n");
|
fprintf(stdout,"TotalDisto\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_PROG_ORDER give_progression(char progression[4]) {
|
static OPJ_PROG_ORDER give_progression(const char progression[4]) {
|
||||||
if(strncmp(progression, "LRCP", 4) == 0) {
|
if(strncmp(progression, "LRCP", 4) == 0) {
|
||||||
return LRCP;
|
return LRCP;
|
||||||
}
|
}
|
||||||
|
@ -345,7 +345,7 @@ OPJ_PROG_ORDER give_progression(char progression[4]) {
|
||||||
return PROG_UNKNOWN;
|
return PROG_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int get_num_images(char *imgdirpath){
|
static unsigned int get_num_images(char *imgdirpath){
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent* content;
|
struct dirent* content;
|
||||||
unsigned int num_images = 0;
|
unsigned int num_images = 0;
|
||||||
|
@ -367,7 +367,7 @@ unsigned int get_num_images(char *imgdirpath){
|
||||||
return num_images;
|
return num_images;
|
||||||
}
|
}
|
||||||
|
|
||||||
int load_images(dircnt_t *dirptr, char *imgdirpath){
|
static int load_images(dircnt_t *dirptr, char *imgdirpath){
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent* content;
|
struct dirent* content;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -392,7 +392,7 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_file_format(char *filename) {
|
static int get_file_format(char *filename) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
static const char *extension[] = {
|
static const char *extension[] = {
|
||||||
"pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "rawl", "tga", "png", "j2k", "jp2", "j2c", "jpc"
|
"pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "rawl", "tga", "png", "j2k", "jp2", "j2c", "jpc"
|
||||||
|
@ -412,14 +412,14 @@ int get_file_format(char *filename) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char * get_file_name(char *name){
|
static char * get_file_name(char *name){
|
||||||
char *fname;
|
char *fname;
|
||||||
fname= (char*)malloc(OPJ_PATH_LEN*sizeof(char));
|
fname= (char*)malloc(OPJ_PATH_LEN*sizeof(char));
|
||||||
fname= strtok(name,".");
|
fname= strtok(name,".");
|
||||||
return fname;
|
return fname;
|
||||||
}
|
}
|
||||||
|
|
||||||
char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_cparameters_t *parameters){
|
static char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_cparameters_t *parameters){
|
||||||
char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN],outfilename[OPJ_PATH_LEN],temp_ofname[OPJ_PATH_LEN];
|
char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN],outfilename[OPJ_PATH_LEN],temp_ofname[OPJ_PATH_LEN];
|
||||||
char *temp_p, temp1[OPJ_PATH_LEN]="";
|
char *temp_p, temp1[OPJ_PATH_LEN]="";
|
||||||
|
|
||||||
|
@ -462,7 +462,7 @@ static int initialise_4K_poc(opj_poc_t *POC, int numres){
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cinema_parameters(opj_cparameters_t *parameters){
|
static void cinema_parameters(opj_cparameters_t *parameters){
|
||||||
parameters->tile_size_on = OPJ_FALSE;
|
parameters->tile_size_on = OPJ_FALSE;
|
||||||
parameters->cp_tdx=1;
|
parameters->cp_tdx=1;
|
||||||
parameters->cp_tdy=1;
|
parameters->cp_tdy=1;
|
||||||
|
@ -495,7 +495,7 @@ void cinema_parameters(opj_cparameters_t *parameters){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){
|
static void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){
|
||||||
int i;
|
int i;
|
||||||
float temp_rate;
|
float temp_rate;
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------------------ */
|
||||||
|
|
||||||
int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
|
static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
|
||||||
img_fol_t *img_fol, raw_cparameters_t *raw_cp, char *indexfilename) {
|
img_fol_t *img_fol, raw_cparameters_t *raw_cp, char *indexfilename) {
|
||||||
int i, j, totlen, c;
|
int i, j, totlen, c;
|
||||||
opj_option_t long_option[]={
|
opj_option_t long_option[]={
|
||||||
|
@ -1535,21 +1535,21 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
sample error callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void error_file_callback(const char *msg, void *client_data) {
|
static void error_file_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[ERROR] %s", msg);
|
fprintf(stream, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
sample warning callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void warning_file_callback(const char *msg, void *client_data) {
|
static void warning_file_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[WARNING] %s", msg);
|
fprintf(stream, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting a FILE* client object
|
sample debug callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void info_file_callback(const char *msg, void *client_data) {
|
static void info_file_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[INFO] %s", msg);
|
fprintf(stream, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
@ -1557,28 +1557,28 @@ void info_file_callback(const char *msg, void *client_data) {
|
||||||
/**
|
/**
|
||||||
sample error debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[ERROR] %s", msg);
|
fprintf(stdout, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[WARNING] %s", msg);
|
fprintf(stdout, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[INFO] %s", msg);
|
fprintf(stdout, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
* IMAGE_TO_J2K MAIN
|
* OPJ_COMPRESS MAIN
|
||||||
*/
|
*/
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
|
@ -97,8 +97,8 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
|
||||||
int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsigned int *DA_x1, unsigned int *DA_y1);
|
int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsigned int *DA_x1, unsigned int *DA_y1);
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
void decode_help_display(void) {
|
static void decode_help_display(void) {
|
||||||
fprintf(stdout,"HELP for j2k_to_image\n----\n\n");
|
fprintf(stdout,"HELP for opj_decompress\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
|
||||||
/* UniPG>> */
|
/* UniPG>> */
|
||||||
|
@ -648,28 +648,28 @@ int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsi
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
sample error callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void error_callback(const char *msg, void *client_data) {
|
static void error_callback(const char *msg, void *client_data) {
|
||||||
(void)client_data;
|
(void)client_data;
|
||||||
fprintf(stdout, "[ERROR] %s", msg);
|
fprintf(stdout, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
sample warning callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void warning_callback(const char *msg, void *client_data) {
|
static void warning_callback(const char *msg, void *client_data) {
|
||||||
(void)client_data;
|
(void)client_data;
|
||||||
fprintf(stdout, "[WARNING] %s", msg);
|
fprintf(stdout, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[INFO] %s", msg);
|
fprintf(stdout, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
* J2K_TO_IMAGE MAIN
|
* OPJ_DECOMPRESS MAIN
|
||||||
*/
|
*/
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
@ -802,7 +802,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* Read the main header of the codestream and if necessary the JP2 boxes*/
|
/* Read the main header of the codestream and if necessary the JP2 boxes*/
|
||||||
if(! opj_read_header(l_stream, l_codec, &image)){
|
if(! opj_read_header(l_stream, l_codec, &image)){
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to read the header\n");
|
fprintf(stderr, "ERROR -> opj_decompress: failed to read the header\n");
|
||||||
opj_stream_destroy(l_stream);
|
opj_stream_destroy(l_stream);
|
||||||
fclose(fsrc);
|
fclose(fsrc);
|
||||||
opj_destroy_codec(l_codec);
|
opj_destroy_codec(l_codec);
|
||||||
|
@ -814,7 +814,7 @@ int main(int argc, char **argv)
|
||||||
/* Optional if you want decode the entire image */
|
/* Optional if you want decode the entire image */
|
||||||
if (!opj_set_decode_area(l_codec, image, parameters.DA_x0,
|
if (!opj_set_decode_area(l_codec, image, parameters.DA_x0,
|
||||||
parameters.DA_y0, parameters.DA_x1, parameters.DA_y1)){
|
parameters.DA_y0, parameters.DA_x1, parameters.DA_y1)){
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to set the decoded area\n");
|
fprintf(stderr, "ERROR -> opj_decompress: failed to set the decoded area\n");
|
||||||
opj_stream_destroy(l_stream);
|
opj_stream_destroy(l_stream);
|
||||||
opj_destroy_codec(l_codec);
|
opj_destroy_codec(l_codec);
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
|
@ -824,7 +824,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* Get the decoded image */
|
/* Get the decoded image */
|
||||||
if (!(opj_decode(l_codec, l_stream, image) && opj_end_decompress(l_codec, l_stream))) {
|
if (!(opj_decode(l_codec, l_stream, image) && opj_end_decompress(l_codec, l_stream))) {
|
||||||
fprintf(stderr,"ERROR -> j2k_to_image: failed to decode image!\n");
|
fprintf(stderr,"ERROR -> opj_decompress: failed to decode image!\n");
|
||||||
opj_destroy_codec(l_codec);
|
opj_destroy_codec(l_codec);
|
||||||
opj_stream_destroy(l_stream);
|
opj_stream_destroy(l_stream);
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
|
@ -836,7 +836,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* It is just here to illustrate how to use the resolution after set parameters */
|
/* It is just here to illustrate how to use the resolution after set parameters */
|
||||||
/*if (!opj_set_decoded_resolution_factor(l_codec, 5)) {
|
/*if (!opj_set_decoded_resolution_factor(l_codec, 5)) {
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to set the resolution factor tile!\n");
|
fprintf(stderr, "ERROR -> opj_decompress: failed to set the resolution factor tile!\n");
|
||||||
opj_destroy_codec(l_codec);
|
opj_destroy_codec(l_codec);
|
||||||
opj_stream_destroy(l_stream);
|
opj_stream_destroy(l_stream);
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
|
@ -845,7 +845,7 @@ int main(int argc, char **argv)
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (!opj_get_decoded_tile(l_codec, l_stream, image, parameters.tile_index)) {
|
if (!opj_get_decoded_tile(l_codec, l_stream, image, parameters.tile_index)) {
|
||||||
fprintf(stderr, "ERROR -> j2k_to_image: failed to decode tile!\n");
|
fprintf(stderr, "ERROR -> opj_decompress: failed to decode tile!\n");
|
||||||
opj_destroy_codec(l_codec);
|
opj_destroy_codec(l_codec);
|
||||||
opj_stream_destroy(l_stream);
|
opj_stream_destroy(l_stream);
|
||||||
opj_image_destroy(image);
|
opj_image_destroy(image);
|
||||||
|
|
|
@ -84,8 +84,8 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
|
||||||
int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsigned int *DA_x1, unsigned int *DA_y1);
|
int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsigned int *DA_x1, unsigned int *DA_y1);
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
void decode_help_display(void) {
|
static void decode_help_display(void) {
|
||||||
fprintf(stdout,"HELP for j2k_dump\n----\n\n");
|
fprintf(stdout,"HELP for opj_dump\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
|
||||||
/* UniPG>> */
|
/* UniPG>> */
|
||||||
|
@ -374,28 +374,28 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
|
||||||
/**
|
/**
|
||||||
sample error debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[ERROR] %s", msg);
|
fprintf(stdout, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[WARNING] %s", msg);
|
fprintf(stdout, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[INFO] %s", msg);
|
fprintf(stdout, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
* J2K_DUMP MAIN
|
* OPJ_DUMP MAIN
|
||||||
*/
|
*/
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@ -533,7 +533,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* Setup the decoder decoding parameters using user parameters */
|
/* Setup the decoder decoding parameters using user parameters */
|
||||||
if ( !opj_setup_decoder(l_codec, ¶meters) ){
|
if ( !opj_setup_decoder(l_codec, ¶meters) ){
|
||||||
fprintf(stderr, "ERROR -> j2k_dump: failed to setup the decoder\n");
|
fprintf(stderr, "ERROR -> opj_dump: failed to setup the decoder\n");
|
||||||
opj_stream_destroy(l_stream);
|
opj_stream_destroy(l_stream);
|
||||||
fclose(fsrc);
|
fclose(fsrc);
|
||||||
opj_destroy_codec(l_codec);
|
opj_destroy_codec(l_codec);
|
||||||
|
@ -543,7 +543,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* Read the main header of the codestream and if necessary the JP2 boxes*/
|
/* Read the main header of the codestream and if necessary the JP2 boxes*/
|
||||||
if(! opj_read_header(l_stream, l_codec, &image)){
|
if(! opj_read_header(l_stream, l_codec, &image)){
|
||||||
fprintf(stderr, "ERROR -> j2k_dump: failed to read the header\n");
|
fprintf(stderr, "ERROR -> opj_dump: failed to read the header\n");
|
||||||
opj_stream_destroy(l_stream);
|
opj_stream_destroy(l_stream);
|
||||||
fclose(fsrc);
|
fclose(fsrc);
|
||||||
opj_destroy_codec(l_codec);
|
opj_destroy_codec(l_codec);
|
||||||
|
|
|
@ -86,7 +86,7 @@ typedef struct img_folder{
|
||||||
float *rates;
|
float *rates;
|
||||||
}img_fol_t;
|
}img_fol_t;
|
||||||
|
|
||||||
void encode_help_display(void) {
|
static void encode_help_display(void) {
|
||||||
fprintf(stdout,"HELP for image_to_j2k\n----\n\n");
|
fprintf(stdout,"HELP for image_to_j2k\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ void encode_help_display(void) {
|
||||||
fprintf(stdout,"TotalDisto\n\n");
|
fprintf(stdout,"TotalDisto\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_PROG_ORDER give_progression(char progression[4]) {
|
static OPJ_PROG_ORDER give_progression(const char progression[4]) {
|
||||||
if(strncmp(progression, "LRCP", 4) == 0) {
|
if(strncmp(progression, "LRCP", 4) == 0) {
|
||||||
return LRCP;
|
return LRCP;
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ OPJ_PROG_ORDER give_progression(char progression[4]) {
|
||||||
return PROG_UNKNOWN;
|
return PROG_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int get_num_images(char *imgdirpath){
|
static unsigned int get_num_images(char *imgdirpath){
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent* content;
|
struct dirent* content;
|
||||||
unsigned int num_images = 0;
|
unsigned int num_images = 0;
|
||||||
|
@ -369,7 +369,7 @@ unsigned int get_num_images(char *imgdirpath){
|
||||||
return num_images;
|
return num_images;
|
||||||
}
|
}
|
||||||
|
|
||||||
int load_images(dircnt_t *dirptr, char *imgdirpath){
|
static int load_images(dircnt_t *dirptr, char *imgdirpath){
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent* content;
|
struct dirent* content;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -394,7 +394,7 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_file_format(char *filename) {
|
static int get_file_format(char *filename) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
static const char *extension[] = {
|
static const char *extension[] = {
|
||||||
"pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "rawl", "tga", "png", "j2k", "jp2", "j2c", "jpc"
|
"pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "rawl", "tga", "png", "j2k", "jp2", "j2c", "jpc"
|
||||||
|
@ -414,14 +414,14 @@ int get_file_format(char *filename) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char * get_file_name(char *name){
|
static char * get_file_name(char *name){
|
||||||
char *fname;
|
char *fname;
|
||||||
fname= (char*)opj_malloc(OPJ_PATH_LEN*sizeof(char));
|
fname= (char*)opj_malloc(OPJ_PATH_LEN*sizeof(char));
|
||||||
fname= strtok(name,".");
|
fname= strtok(name,".");
|
||||||
return fname;
|
return fname;
|
||||||
}
|
}
|
||||||
|
|
||||||
char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_cparameters_t *parameters){
|
static char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_cparameters_t *parameters){
|
||||||
char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN],outfilename[OPJ_PATH_LEN],temp_ofname[OPJ_PATH_LEN];
|
char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN],outfilename[OPJ_PATH_LEN],temp_ofname[OPJ_PATH_LEN];
|
||||||
char *temp_p, temp1[OPJ_PATH_LEN]="";
|
char *temp_p, temp1[OPJ_PATH_LEN]="";
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ static int initialise_4K_poc(opj_poc_t *POC, int numres){
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cinema_parameters(opj_cparameters_t *parameters){
|
static void cinema_parameters(opj_cparameters_t *parameters){
|
||||||
parameters->tile_size_on = OPJ_FALSE;
|
parameters->tile_size_on = OPJ_FALSE;
|
||||||
parameters->cp_tdx=1;
|
parameters->cp_tdx=1;
|
||||||
parameters->cp_tdy=1;
|
parameters->cp_tdy=1;
|
||||||
|
@ -497,7 +497,7 @@ void cinema_parameters(opj_cparameters_t *parameters){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){
|
static void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){
|
||||||
int i;
|
int i;
|
||||||
float temp_rate;
|
float temp_rate;
|
||||||
|
|
||||||
|
@ -582,7 +582,7 @@ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------------------ */
|
||||||
|
|
||||||
int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
|
static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
|
||||||
img_fol_t *img_fol, raw_cparameters_t *raw_cp, char *indexfilename) {
|
img_fol_t *img_fol, raw_cparameters_t *raw_cp, char *indexfilename) {
|
||||||
int i, j, totlen, c;
|
int i, j, totlen, c;
|
||||||
opj_option_t long_option[]={
|
opj_option_t long_option[]={
|
||||||
|
@ -1537,21 +1537,21 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
sample error callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void error_file_callback(const char *msg, void *client_data) {
|
static void error_file_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[ERROR] %s", msg);
|
fprintf(stream, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
sample warning callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void warning_file_callback(const char *msg, void *client_data) {
|
static void warning_file_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[WARNING] %s", msg);
|
fprintf(stream, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting a FILE* client object
|
sample debug callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void info_file_callback(const char *msg, void *client_data) {
|
static void info_file_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[INFO] %s", msg);
|
fprintf(stream, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
@ -1559,21 +1559,21 @@ void info_file_callback(const char *msg, void *client_data) {
|
||||||
/**
|
/**
|
||||||
sample error debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[ERROR] %s", msg);
|
fprintf(stdout, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[WARNING] %s", msg);
|
fprintf(stdout, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[INFO] %s", msg);
|
fprintf(stdout, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,21 +50,21 @@ Size of memory first allocated for MOOV box
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
sample error callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void error_callback(const char *msg, void *client_data) {
|
static void error_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[ERROR] %s", msg);
|
fprintf(stream, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
sample warning callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void warning_callback(const char *msg, void *client_data) {
|
static void warning_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[WARNING] %s", msg);
|
fprintf(stream, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting a FILE* client object
|
sample debug callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void info_callback(const char *msg, void *client_data) {
|
static void info_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[INFO] %s", msg);
|
fprintf(stream, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ void info_callback(const char *msg, void *client_data) {
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
void help_display()
|
static void help_display()
|
||||||
{
|
{
|
||||||
fprintf(stdout,"HELP for frames_to_mj2\n----\n\n");
|
fprintf(stdout,"HELP for frames_to_mj2\n----\n\n");
|
||||||
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
|
||||||
|
@ -197,7 +197,7 @@ void help_display()
|
||||||
fprintf(stdout,"TotalDisto\n\n");
|
fprintf(stdout,"TotalDisto\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_PROG_ORDER give_progression(char progression[5])
|
static OPJ_PROG_ORDER give_progression(const char progression[5])
|
||||||
{
|
{
|
||||||
if (progression[0] == 'L' && progression[1] == 'R'
|
if (progression[0] == 'L' && progression[1] == 'R'
|
||||||
&& progression[2] == 'C' && progression[3] == 'P') {
|
&& progression[2] == 'C' && progression[3] == 'P') {
|
||||||
|
|
|
@ -50,21 +50,21 @@
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
sample error callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void error_callback(const char *msg, void *client_data) {
|
static void error_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[ERROR] %s", msg);
|
fprintf(stream, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
sample warning callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void warning_callback(const char *msg, void *client_data) {
|
static void warning_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[WARNING] %s", msg);
|
fprintf(stream, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting a FILE* client object
|
sample debug callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void info_callback(const char *msg, void *client_data) {
|
static void info_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[INFO] %s", msg);
|
fprintf(stream, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,21 +183,21 @@ fin:
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
sample error callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void error_callback(const char *msg, void *client_data) {
|
static void error_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[ERROR] %s", msg);
|
fprintf(stream, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
sample warning callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void warning_callback(const char *msg, void *client_data) {
|
static void warning_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[WARNING] %s", msg);
|
fprintf(stream, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting a FILE* client object
|
sample debug callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void info_callback(const char *msg, void *client_data) {
|
static void info_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[INFO] %s", msg);
|
fprintf(stream, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ typedef struct opj_procedure_list
|
||||||
*
|
*
|
||||||
* @return the newly created validation list.
|
* @return the newly created validation list.
|
||||||
*/
|
*/
|
||||||
opj_procedure_list_t * opj_procedure_list_create();
|
opj_procedure_list_t * opj_procedure_list_create(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys a validation list.
|
* Destroys a validation list.
|
||||||
|
|
|
@ -134,11 +134,11 @@ void opj_calculate_norms( OPJ_FLOAT64 * pNorms,
|
||||||
/**
|
/**
|
||||||
FIXME DOC
|
FIXME DOC
|
||||||
*/
|
*/
|
||||||
const OPJ_FLOAT64 * opj_mct_get_mct_norms ();
|
const OPJ_FLOAT64 * opj_mct_get_mct_norms (void);
|
||||||
/**
|
/**
|
||||||
FIXME DOC
|
FIXME DOC
|
||||||
*/
|
*/
|
||||||
const OPJ_FLOAT64 * opj_mct_get_mct_norms_real ();
|
const OPJ_FLOAT64 * opj_mct_get_mct_norms_real (void);
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
|
|
|
@ -199,13 +199,13 @@ opj_bool OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec,
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
OPJ_SIZE_T opj_read_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file)
|
static OPJ_SIZE_T opj_read_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file)
|
||||||
{
|
{
|
||||||
OPJ_SIZE_T l_nb_read = fread(p_buffer,1,p_nb_bytes,p_file);
|
OPJ_SIZE_T l_nb_read = fread(p_buffer,1,p_nb_bytes,p_file);
|
||||||
return l_nb_read ? l_nb_read : -1;
|
return l_nb_read ? l_nb_read : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_UINT64 opj_get_data_length_from_file (FILE * p_file)
|
static OPJ_UINT64 opj_get_data_length_from_file (FILE * p_file)
|
||||||
{
|
{
|
||||||
OPJ_OFF_T file_length = 0;
|
OPJ_OFF_T file_length = 0;
|
||||||
|
|
||||||
|
@ -216,12 +216,12 @@ OPJ_UINT64 opj_get_data_length_from_file (FILE * p_file)
|
||||||
return file_length;
|
return file_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_SIZE_T opj_write_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file)
|
static OPJ_SIZE_T opj_write_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file)
|
||||||
{
|
{
|
||||||
return fwrite(p_buffer,1,p_nb_bytes,p_file);
|
return fwrite(p_buffer,1,p_nb_bytes,p_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_OFF_T opj_skip_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
|
static OPJ_OFF_T opj_skip_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
|
||||||
{
|
{
|
||||||
if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_CUR)) {
|
if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_CUR)) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -230,7 +230,7 @@ OPJ_OFF_T opj_skip_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
|
||||||
return p_nb_bytes;
|
return p_nb_bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_seek_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
|
static opj_bool opj_seek_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
|
||||||
{
|
{
|
||||||
if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_SET)) {
|
if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_SET)) {
|
||||||
return OPJ_FALSE;
|
return OPJ_FALSE;
|
||||||
|
|
|
@ -143,7 +143,7 @@ opj_bool opj_t1_decode_cblks( opj_t1_t* t1,
|
||||||
* and initializes the look-up tables of the Tier-1 coder/decoder
|
* and initializes the look-up tables of the Tier-1 coder/decoder
|
||||||
* @return a new T1 handle if successful, returns NULL otherwise
|
* @return a new T1 handle if successful, returns NULL otherwise
|
||||||
*/
|
*/
|
||||||
opj_t1_t* opj_t1_create();
|
opj_t1_t* opj_t1_create(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys a previously created T1 handle
|
* Destroys a previously created T1 handle
|
||||||
|
|
|
@ -63,7 +63,7 @@ typedef struct opj_bio {
|
||||||
Create a new BIO handle
|
Create a new BIO handle
|
||||||
@return Returns a new BIO handle if successful, returns NULL otherwise
|
@return Returns a new BIO handle if successful, returns NULL otherwise
|
||||||
*/
|
*/
|
||||||
opj_bio_t* bio_create();
|
opj_bio_t* bio_create(void);
|
||||||
/**
|
/**
|
||||||
Destroy a previously created BIO handle
|
Destroy a previously created BIO handle
|
||||||
@param bio BIO handle to destroy
|
@param bio BIO handle to destroy
|
||||||
|
|
|
@ -122,7 +122,7 @@ unsigned char *cio_getbp(opj_cio_t *cio) {
|
||||||
/*
|
/*
|
||||||
* Write a byte.
|
* Write a byte.
|
||||||
*/
|
*/
|
||||||
bool cio_byteout(opj_cio_t *cio, unsigned char v) {
|
static bool cio_byteout(opj_cio_t *cio, unsigned char v) {
|
||||||
if (cio->bp >= cio->end) {
|
if (cio->bp >= cio->end) {
|
||||||
opj_event_msg(cio->cinfo, EVT_ERROR, "write error\n");
|
opj_event_msg(cio->cinfo, EVT_ERROR, "write error\n");
|
||||||
return false;
|
return false;
|
||||||
|
@ -134,7 +134,7 @@ bool cio_byteout(opj_cio_t *cio, unsigned char v) {
|
||||||
/*
|
/*
|
||||||
* Read a byte.
|
* Read a byte.
|
||||||
*/
|
*/
|
||||||
unsigned char cio_bytein(opj_cio_t *cio) {
|
static unsigned char cio_bytein(opj_cio_t *cio) {
|
||||||
if (cio->bp >= cio->end) {
|
if (cio->bp >= cio->end) {
|
||||||
opj_event_msg(cio->cinfo, EVT_ERROR, "read error\n");
|
opj_event_msg(cio->cinfo, EVT_ERROR, "read error\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -316,7 +316,7 @@ static void j3d_read_nlt(opj_j3d_t *j3d);
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
void j3d_dump_volume(FILE *fd, opj_volume_t * vol) {
|
static void j3d_dump_volume(FILE *fd, opj_volume_t * vol) {
|
||||||
int compno;
|
int compno;
|
||||||
fprintf(fd, "volume {\n");
|
fprintf(fd, "volume {\n");
|
||||||
fprintf(fd, " x0=%d, y0=%d, z0=%d, x1=%d, y1=%d, z1=%d\n", vol->x0, vol->y0, vol->z0,vol->x1, vol->y1, vol->z1);
|
fprintf(fd, " x0=%d, y0=%d, z0=%d, x1=%d, y1=%d, z1=%d\n", vol->x0, vol->y0, vol->z0,vol->x1, vol->y1, vol->z1);
|
||||||
|
@ -332,7 +332,7 @@ void j3d_dump_volume(FILE *fd, opj_volume_t * vol) {
|
||||||
fprintf(fd, "}\n");
|
fprintf(fd, "}\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void j3d_dump_cp(FILE *fd, opj_volume_t * vol, opj_cp_t * cp) {
|
static void j3d_dump_cp(FILE *fd, opj_volume_t * vol, opj_cp_t * cp) {
|
||||||
int tileno, compno, layno, bandno, resno, numbands;
|
int tileno, compno, layno, bandno, resno, numbands;
|
||||||
fprintf(fd, "coding parameters {\n");
|
fprintf(fd, "coding parameters {\n");
|
||||||
fprintf(fd, " tx0=%d, ty0=%d, tz0=%d\n", cp->tx0, cp->ty0, cp->tz0);
|
fprintf(fd, " tx0=%d, ty0=%d, tz0=%d\n", cp->tx0, cp->ty0, cp->tz0);
|
||||||
|
|
|
@ -43,7 +43,7 @@ The functions in JP3D_LIB.C are internal utilities mainly used for memory manage
|
||||||
Difference in successive opj_clock() calls tells you the elapsed time
|
Difference in successive opj_clock() calls tells you the elapsed time
|
||||||
@return Returns time in seconds
|
@return Returns time in seconds
|
||||||
*/
|
*/
|
||||||
double opj_clock();
|
double opj_clock(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Allocate a memory block with elements initialized to 0
|
Allocate a memory block with elements initialized to 0
|
||||||
|
|
|
@ -78,7 +78,7 @@ typedef struct opj_mqc {
|
||||||
Create a new MQC handle
|
Create a new MQC handle
|
||||||
@return Returns a new MQC handle if successful, returns NULL otherwise
|
@return Returns a new MQC handle if successful, returns NULL otherwise
|
||||||
*/
|
*/
|
||||||
opj_mqc_t* mqc_create();
|
opj_mqc_t* mqc_create(void);
|
||||||
/**
|
/**
|
||||||
Destroy a previously created MQC handle
|
Destroy a previously created MQC handle
|
||||||
@param mqc MQC handle to destroy
|
@param mqc MQC handle to destroy
|
||||||
|
|
|
@ -560,7 +560,7 @@ extern "C" {
|
||||||
==========================================================
|
==========================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
OPJ_API const char * OPJ_CALLCONV opj_version();
|
OPJ_API const char * OPJ_CALLCONV opj_version(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==========================================================
|
==========================================================
|
||||||
|
|
|
@ -66,7 +66,7 @@ typedef struct opj_raw {
|
||||||
Create a new RAW handle
|
Create a new RAW handle
|
||||||
@return Returns a new RAW handle if successful, returns NULL otherwise
|
@return Returns a new RAW handle if successful, returns NULL otherwise
|
||||||
*/
|
*/
|
||||||
opj_raw_t* raw_create();
|
opj_raw_t* raw_create(void);
|
||||||
/**
|
/**
|
||||||
Destroy a previously created RAW handle
|
Destroy a previously created RAW handle
|
||||||
@param raw RAW handle to destroy
|
@param raw RAW handle to destroy
|
||||||
|
|
|
@ -82,7 +82,7 @@ void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_volume_t * vol) {
|
||||||
fprintf(fd, "}\n");
|
fprintf(fd, "}\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void tilec_dump(FILE *fd, opj_tcd_tilecomp_t *tilec) {
|
static void tilec_dump(FILE *fd, opj_tcd_tilecomp_t *tilec) {
|
||||||
|
|
||||||
int i=0,k;
|
int i=0,k;
|
||||||
int datalen;
|
int datalen;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
* Store information (7 bits) in value
|
* Store information (7 bits) in value
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
unsigned int jpt_read_VBAS_info(opj_cio_t *cio, unsigned int value) {
|
static unsigned int jpt_read_VBAS_info(opj_cio_t *cio, unsigned int value) {
|
||||||
unsigned char elmt;
|
unsigned char elmt;
|
||||||
|
|
||||||
elmt = cio_read(cio, 1);
|
elmt = cio_read(cio, 1);
|
||||||
|
@ -69,7 +69,7 @@ void jpt_init_msg_header(opj_jpt_msg_header_t * header) {
|
||||||
* Only parameters always present in message header
|
* Only parameters always present in message header
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void jpt_reinit_msg_header(opj_jpt_msg_header_t * header) {
|
static void jpt_reinit_msg_header(opj_jpt_msg_header_t * header) {
|
||||||
header->Id = 0; /* In-class Identifier */
|
header->Id = 0; /* In-class Identifier */
|
||||||
header->last_byte = 0; /* Last byte information */
|
header->last_byte = 0; /* Last byte information */
|
||||||
header->Msg_offset = 0; /* Message offset */
|
header->Msg_offset = 0; /* Message offset */
|
||||||
|
|
|
@ -50,6 +50,8 @@ add_test(tte2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 3 2048 2048 1024 1024
|
||||||
add_test(tte3 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 2048 2048 1024 1024 8 1 tte3.j2k)
|
add_test(tte3 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 2048 2048 1024 1024 8 1 tte3.j2k)
|
||||||
add_test(tte4 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 256 256 128 128 8 0 tte4.j2k)
|
add_test(tte4 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 256 256 128 128 8 0 tte4.j2k)
|
||||||
add_test(tte5 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 512 512 256 256 8 0 tte5.j2k)
|
add_test(tte5 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 512 512 256 256 8 0 tte5.j2k)
|
||||||
|
#add_test(tte6 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 8192 8192 512 512 8 0 tte6.j2k)
|
||||||
|
#add_test(tte7 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 32768 32768 512 512 8 0 tte7.jp2)
|
||||||
|
|
||||||
add_executable(test_tile_decoder test_tile_decoder.c)
|
add_executable(test_tile_decoder test_tile_decoder.c)
|
||||||
target_link_libraries(test_tile_decoder ${OPENJPEG_LIBRARY_NAME})
|
target_link_libraries(test_tile_decoder ${OPENJPEG_LIBRARY_NAME})
|
||||||
|
@ -60,6 +62,10 @@ add_test(ttd1 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte1.j2k
|
||||||
set_property(TEST ttd1 APPEND PROPERTY DEPENDS tte1)
|
set_property(TEST ttd1 APPEND PROPERTY DEPENDS tte1)
|
||||||
add_test(ttd2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte2.jp2)
|
add_test(ttd2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte2.jp2)
|
||||||
set_property(TEST ttd2 APPEND PROPERTY DEPENDS tte2)
|
set_property(TEST ttd2 APPEND PROPERTY DEPENDS tte2)
|
||||||
|
#add_test(ttd6 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 512 512 tte6.j2k)
|
||||||
|
#set_property(TEST ttd6 APPEND PROPERTY DEPENDS tte6)
|
||||||
|
#add_test(ttd7 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 512 512 tte7.jp2)
|
||||||
|
#set_property(TEST ttd7 APPEND PROPERTY DEPENDS tte7)
|
||||||
|
|
||||||
# No image send to the dashboard if lib PNG is not available.
|
# No image send to the dashboard if lib PNG is not available.
|
||||||
if(NOT HAVE_LIBPNG)
|
if(NOT HAVE_LIBPNG)
|
||||||
|
|
|
@ -62,7 +62,7 @@ void compareRAWimages_help_display(void) {
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Parse command line
|
* Parse command line
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
|
static int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
|
||||||
{
|
{
|
||||||
int sizemembasefile, sizememtestfile;
|
int sizemembasefile, sizememtestfile;
|
||||||
int index;
|
int index;
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef struct test_cmp_parameters
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Command line help function
|
* Command line help function
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
void compare_dump_files_help_display(void) {
|
static void compare_dump_files_help_display(void) {
|
||||||
fprintf(stdout,"\nList of parameters for the compare_dump_files function \n");
|
fprintf(stdout,"\nList of parameters for the compare_dump_files function \n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout," -b \t REQUIRED \t filename to the reference/baseline dump file \n");
|
fprintf(stdout," -b \t REQUIRED \t filename to the reference/baseline dump file \n");
|
||||||
|
@ -60,7 +60,7 @@ void compare_dump_files_help_display(void) {
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Parse command line
|
* Parse command line
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
|
static int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
|
||||||
{
|
{
|
||||||
int sizemembasefile, sizememtestfile;
|
int sizemembasefile, sizememtestfile;
|
||||||
int index;
|
int index;
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
#include "format_defs.h"
|
#include "format_defs.h"
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
int get_file_format(const char *filename) {
|
static int get_file_format(const char *filename) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
static const char *extension[] = {"pgx", "pnm", "pgm", "ppm", "bmp","tif", "raw", "tga", "png", "j2k", "jp2", "jpt", "j2c", "jpc" };
|
static const char *extension[] = {"pgx", "pnm", "pgm", "ppm", "bmp","tif", "raw", "tga", "png", "j2k", "jp2", "jpt", "j2c", "jpc" };
|
||||||
static const int format[] = { PGX_DFMT, PXM_DFMT, PXM_DFMT, PXM_DFMT, BMP_DFMT, TIF_DFMT, RAW_DFMT, TGA_DFMT, PNG_DFMT, J2K_CFMT, JP2_CFMT, JPT_CFMT, J2K_CFMT, J2K_CFMT };
|
static const int format[] = { PGX_DFMT, PXM_DFMT, PXM_DFMT, PXM_DFMT, BMP_DFMT, TIF_DFMT, RAW_DFMT, TGA_DFMT, PNG_DFMT, J2K_CFMT, JP2_CFMT, JPT_CFMT, J2K_CFMT, J2K_CFMT };
|
||||||
|
@ -72,21 +72,21 @@ int get_file_format(const char *filename) {
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
sample error callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void error_callback(const char *msg, void *client_data) {
|
static void error_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[ERROR] %s", msg);
|
fprintf(stream, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
sample warning callback expecting a FILE* client object
|
||||||
*/
|
*/
|
||||||
void warning_callback(const char *msg, void *client_data) {
|
static void warning_callback(const char *msg, void *client_data) {
|
||||||
FILE *stream = (FILE*)client_data;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[WARNING] %s", msg);
|
fprintf(stream, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[INFO] %s", msg);
|
fprintf(stdout, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,35 +139,35 @@ static int infile_format(const char *fname)
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
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;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[ERROR] %s", msg);
|
fprintf(stream, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
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;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[WARNING] %s", msg);
|
fprintf(stream, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample error debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[ERROR] %s", msg);
|
fprintf(stdout, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[WARNING] %s", msg);
|
fprintf(stdout, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[INFO] %s", msg);
|
fprintf(stdout, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,35 +38,35 @@
|
||||||
/**
|
/**
|
||||||
sample error callback expecting a FILE* client object
|
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;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[ERROR] %s", msg);
|
fprintf(stream, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning callback expecting a FILE* client object
|
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;
|
FILE *stream = (FILE*)client_data;
|
||||||
fprintf(stream, "[WARNING] %s", msg);
|
fprintf(stream, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample error debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[ERROR] %s", msg);
|
fprintf(stdout, "[ERROR] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample warning debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[WARNING] %s", msg);
|
fprintf(stdout, "[WARNING] %s", msg);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
sample debug callback expecting no client object
|
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;
|
(void)client_data;
|
||||||
fprintf(stdout, "[INFO] %s", msg);
|
fprintf(stdout, "[INFO] %s", msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue