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;
size_t res;
float *rates;
}img_fol_t;
-void encode_help_display(void) {
- fprintf(stdout,"HELP for image_to_j2k\n----\n\n");
+static void encode_help_display(void) {
+ fprintf(stdout,"HELP for opj_compress\n----\n\n");
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
/* UniPG>> */
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) {
return LRCP;
}
return PROG_UNKNOWN;
}
-unsigned int get_num_images(char *imgdirpath){
+static unsigned int get_num_images(char *imgdirpath){
DIR *dir;
struct dirent* content;
unsigned int num_images = 0;
return num_images;
}
-int load_images(dircnt_t *dirptr, char *imgdirpath){
+static int load_images(dircnt_t *dirptr, char *imgdirpath){
DIR *dir;
struct dirent* content;
int i = 0;
return 0;
}
-int get_file_format(char *filename) {
+static int get_file_format(char *filename) {
unsigned int i;
static const char *extension[] = {
"pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "rawl", "tga", "png", "j2k", "jp2", "j2c", "jpc"
return -1;
}
-char * get_file_name(char *name){
+static char * get_file_name(char *name){
char *fname;
fname= (char*)malloc(OPJ_PATH_LEN*sizeof(char));
fname= strtok(name,".");
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 *temp_p, temp1[OPJ_PATH_LEN]="";
return 2;
}
-void cinema_parameters(opj_cparameters_t *parameters){
+static void cinema_parameters(opj_cparameters_t *parameters){
parameters->tile_size_on = OPJ_FALSE;
parameters->cp_tdx=1;
parameters->cp_tdy=1;
}
-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;
float temp_rate;
/* ------------------------------------------------------------------------------------ */
-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) {
int i, j, totlen, c;
opj_option_t long_option[]={
/**
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;
fprintf(stream, "[ERROR] %s", msg);
}
/**
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;
fprintf(stream, "[WARNING] %s", msg);
}
/**
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;
fprintf(stream, "[INFO] %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);
}
/* -------------------------------------------------------------------------- */
/**
- * IMAGE_TO_J2K MAIN
+ * OPJ_COMPRESS MAIN
*/
/* -------------------------------------------------------------------------- */
int main(int argc, char **argv) {
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) {
- fprintf(stdout,"HELP for j2k_to_image\n----\n\n");
+static void decode_help_display(void) {
+ fprintf(stdout,"HELP for opj_decompress\n----\n\n");
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
/* UniPG>> */
/**
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;
fprintf(stdout, "[ERROR] %s", msg);
}
/**
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;
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);
}
/* -------------------------------------------------------------------------- */
/**
- * J2K_TO_IMAGE MAIN
+ * OPJ_DECOMPRESS MAIN
*/
/* -------------------------------------------------------------------------- */
int main(int argc, char **argv)
/* Read the main header of the codestream and if necessary the JP2 boxes*/
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);
fclose(fsrc);
opj_destroy_codec(l_codec);
/* Optional if you want decode the entire image */
if (!opj_set_decode_area(l_codec, image, parameters.DA_x0,
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_destroy_codec(l_codec);
opj_image_destroy(image);
/* Get the decoded image */
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_stream_destroy(l_stream);
opj_image_destroy(image);
/* It is just here to illustrate how to use the resolution after set parameters */
/*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_stream_destroy(l_stream);
opj_image_destroy(image);
}*/
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_stream_destroy(l_stream);
opj_image_destroy(image);
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) {
- fprintf(stdout,"HELP for j2k_dump\n----\n\n");
+static void decode_help_display(void) {
+ fprintf(stdout,"HELP for opj_dump\n----\n\n");
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
/* UniPG>> */
/**
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);
}
/* -------------------------------------------------------------------------- */
/**
- * J2K_DUMP MAIN
+ * OPJ_DUMP MAIN
*/
/* -------------------------------------------------------------------------- */
int main(int argc, char *argv[])
/* Setup the decoder decoding parameters using user parameters */
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);
fclose(fsrc);
opj_destroy_codec(l_codec);
/* Read the main header of the codestream and if necessary the JP2 boxes*/
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);
fclose(fsrc);
opj_destroy_codec(l_codec);
float *rates;
}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,"- the -h option displays this help information on screen\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) {
return LRCP;
}
return PROG_UNKNOWN;
}
-unsigned int get_num_images(char *imgdirpath){
+static unsigned int get_num_images(char *imgdirpath){
DIR *dir;
struct dirent* content;
unsigned int num_images = 0;
return num_images;
}
-int load_images(dircnt_t *dirptr, char *imgdirpath){
+static int load_images(dircnt_t *dirptr, char *imgdirpath){
DIR *dir;
struct dirent* content;
int i = 0;
return 0;
}
-int get_file_format(char *filename) {
+static int get_file_format(char *filename) {
unsigned int i;
static const char *extension[] = {
"pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "rawl", "tga", "png", "j2k", "jp2", "j2c", "jpc"
return -1;
}
-char * get_file_name(char *name){
+static char * get_file_name(char *name){
char *fname;
fname= (char*)opj_malloc(OPJ_PATH_LEN*sizeof(char));
fname= strtok(name,".");
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 *temp_p, temp1[OPJ_PATH_LEN]="";
return 2;
}
-void cinema_parameters(opj_cparameters_t *parameters){
+static void cinema_parameters(opj_cparameters_t *parameters){
parameters->tile_size_on = OPJ_FALSE;
parameters->cp_tdx=1;
parameters->cp_tdy=1;
}
-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;
float temp_rate;
/* ------------------------------------------------------------------------------------ */
-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) {
int i, j, totlen, c;
opj_option_t long_option[]={
/**
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;
fprintf(stream, "[ERROR] %s", msg);
}
/**
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;
fprintf(stream, "[WARNING] %s", msg);
}
/**
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;
fprintf(stream, "[INFO] %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);
}
/**
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;
fprintf(stream, "[ERROR] %s", msg);
}
/**
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;
fprintf(stream, "[WARNING] %s", msg);
}
/**
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;
fprintf(stream, "[INFO] %s", msg);
}
/* -------------------------------------------------------------------------- */
-void help_display()
+static void help_display()
{
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,"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'
&& progression[2] == 'C' && progression[3] == 'P') {
/**
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;
fprintf(stream, "[ERROR] %s", msg);
}
/**
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;
fprintf(stream, "[WARNING] %s", msg);
}
/**
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;
fprintf(stream, "[INFO] %s", msg);
}
/**
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;
fprintf(stream, "[ERROR] %s", msg);
}
/**
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;
fprintf(stream, "[WARNING] %s", msg);
}
/**
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;
fprintf(stream, "[INFO] %s", msg);
}
*
* @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.
/**
FIXME DOC
*/
-const OPJ_FLOAT64 * opj_mct_get_mct_norms ();
+const OPJ_FLOAT64 * opj_mct_get_mct_norms (void);
/**
FIXME DOC
*/
-const OPJ_FLOAT64 * opj_mct_get_mct_norms_real ();
+const OPJ_FLOAT64 * opj_mct_get_mct_norms_real (void);
/* ----------------------------------------------------------------------- */
/*@}*/
/* ---------------------------------------------------------------------- */
-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);
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;
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);
}
-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)) {
return -1;
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)) {
return OPJ_FALSE;
* and initializes the look-up tables of the Tier-1 coder/decoder
* @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
Create a new BIO handle \r
@return Returns a new BIO handle if successful, returns NULL otherwise\r
*/\r
-opj_bio_t* bio_create();\r
+opj_bio_t* bio_create(void);\r
/**\r
Destroy a previously created BIO handle\r
@param bio BIO handle to destroy\r
/*\r
* Write a byte.\r
*/\r
-bool cio_byteout(opj_cio_t *cio, unsigned char v) {\r
+static bool cio_byteout(opj_cio_t *cio, unsigned char v) {\r
if (cio->bp >= cio->end) {\r
opj_event_msg(cio->cinfo, EVT_ERROR, "write error\n");\r
return false;\r
/*\r
* Read a byte.\r
*/\r
-unsigned char cio_bytein(opj_cio_t *cio) {\r
+static unsigned char cio_bytein(opj_cio_t *cio) {\r
if (cio->bp >= cio->end) {\r
opj_event_msg(cio->cinfo, EVT_ERROR, "read error\n");\r
return 0;\r
\r
/* ----------------------------------------------------------------------- */\r
\r
-void j3d_dump_volume(FILE *fd, opj_volume_t * vol) {\r
+static void j3d_dump_volume(FILE *fd, opj_volume_t * vol) {\r
int compno;\r
fprintf(fd, "volume {\n");\r
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);\r
fprintf(fd, "}\n");\r
}\r
\r
-void j3d_dump_cp(FILE *fd, opj_volume_t * vol, opj_cp_t * cp) {\r
+static void j3d_dump_cp(FILE *fd, opj_volume_t * vol, opj_cp_t * cp) {\r
int tileno, compno, layno, bandno, resno, numbands;\r
fprintf(fd, "coding parameters {\n");\r
fprintf(fd, " tx0=%d, ty0=%d, tz0=%d\n", cp->tx0, cp->ty0, cp->tz0);\r
Difference in successive opj_clock() calls tells you the elapsed time\r
@return Returns time in seconds\r
*/\r
-double opj_clock();\r
+double opj_clock(void);\r
\r
/**\r
Allocate a memory block with elements initialized to 0\r
Create a new MQC handle \r
@return Returns a new MQC handle if successful, returns NULL otherwise\r
*/\r
-opj_mqc_t* mqc_create();\r
+opj_mqc_t* mqc_create(void);\r
/**\r
Destroy a previously created MQC handle\r
@param mqc MQC handle to destroy\r
==========================================================\r
*/\r
\r
-OPJ_API const char * OPJ_CALLCONV opj_version();\r
+OPJ_API const char * OPJ_CALLCONV opj_version(void);\r
\r
/* \r
==========================================================\r
Create a new RAW handle \r
@return Returns a new RAW handle if successful, returns NULL otherwise\r
*/\r
-opj_raw_t* raw_create();\r
+opj_raw_t* raw_create(void);\r
/**\r
Destroy a previously created RAW handle\r
@param raw RAW handle to destroy\r
fprintf(fd, "}\n");\r
}\r
\r
-void tilec_dump(FILE *fd, opj_tcd_tilecomp_t *tilec) {\r
+static void tilec_dump(FILE *fd, opj_tcd_tilecomp_t *tilec) {\r
\r
int i=0,k;\r
int datalen;\r
* 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;
elmt = cio_read(cio, 1);
* 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->last_byte = 0; /* Last byte information */
header->Msg_offset = 0; /* Message offset */
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(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)
target_link_libraries(test_tile_decoder ${OPENJPEG_LIBRARY_NAME})
set_property(TEST ttd1 APPEND PROPERTY DEPENDS tte1)
add_test(ttd2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte2.jp2)
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.
if(NOT HAVE_LIBPNG)
/*******************************************************************************
* 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 index;
/*******************************************************************************
* 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,"\n");
fprintf(stdout," -b \t REQUIRED \t filename to the reference/baseline dump file \n");
/*******************************************************************************
* 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 index;
#include "format_defs.h"
/* -------------------------------------------------------------------------- */
-int get_file_format(const char *filename) {
+static int get_file_format(const char *filename) {
unsigned int i;
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 };
/**
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;
fprintf(stream, "[ERROR] %s", msg);
}
/**
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;
fprintf(stream, "[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);
}
/**
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);
}
/**
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);
}