[trunk] Add more test in j2k_random_tile_access
Update issue 186
This commit is contained in:
parent
fb0a11636f
commit
8f58b776b0
|
@ -104,7 +104,7 @@ static int infile_format(const char *fname)
|
||||||
const char *s, *magic_s;
|
const char *s, *magic_s;
|
||||||
int ext_format, magic_format;
|
int ext_format, magic_format;
|
||||||
unsigned char buf[12];
|
unsigned char buf[12];
|
||||||
unsigned int l_nb_read;
|
OPJ_SIZE_T l_nb_read;
|
||||||
|
|
||||||
reader = fopen(fname, "rb");
|
reader = fopen(fname, "rb");
|
||||||
|
|
||||||
|
@ -157,6 +157,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
FILE *fsrc = NULL;
|
FILE *fsrc = NULL;
|
||||||
|
|
||||||
|
OPJ_UINT32 index;
|
||||||
opj_dparameters_t parameters; /* decompression parameters */
|
opj_dparameters_t parameters; /* decompression parameters */
|
||||||
opj_image_t* image = NULL;
|
opj_image_t* image = NULL;
|
||||||
opj_stream_t *l_stream = NULL; /* Stream */
|
opj_stream_t *l_stream = NULL; /* Stream */
|
||||||
|
@ -269,6 +270,10 @@ int main(int argc, char **argv)
|
||||||
fclose(fsrc); \
|
fclose(fsrc); \
|
||||||
return EXIT_FAILURE; \
|
return EXIT_FAILURE; \
|
||||||
} \
|
} \
|
||||||
|
for(index = 0; index < image->numcomps; ++index) { \
|
||||||
|
if( image->comps[index].data == NULL ) \
|
||||||
|
return EXIT_FAILURE; \
|
||||||
|
} \
|
||||||
fprintf(stdout, "Tile %d is decoded successfully\n", tile_index);
|
fprintf(stdout, "Tile %d is decoded successfully\n", tile_index);
|
||||||
|
|
||||||
TEST_TILE(tile_ul)
|
TEST_TILE(tile_ul)
|
||||||
|
|
Loading…
Reference in New Issue