Fix typos in comments and string
Most typos were found by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
838dfb8058
commit
99fc1ab306
@ -30,7 +30,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
|
|||||||
# java also warns about deprecated API
|
# java also warns about deprecated API
|
||||||
".*java.*deprecation"
|
".*java.*deprecation"
|
||||||
".*deprecation.*"
|
".*deprecation.*"
|
||||||
# supress warnings caused by 3rd party libs:
|
# suppress warnings caused by 3rd party libs:
|
||||||
".*thirdparty.*"
|
".*thirdparty.*"
|
||||||
"libtiff.*has no symbols"
|
"libtiff.*has no symbols"
|
||||||
"libpng.*has no symbols"
|
"libpng.*has no symbols"
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* \section sysarchtect System Architecture
|
* \section sysarchtect System Architecture
|
||||||
* JPIP protocol is implimented between the JPIP server program (opj_server) and the JPIP client java program (opj_viewer).\n
|
* JPIP protocol is implemented between the JPIP server program (opj_server) and the JPIP client java program (opj_viewer).\n
|
||||||
* Figure below represents the overview of our system architecture.\n
|
* Figure below represents the overview of our system architecture.\n
|
||||||
* The JPIP server parses JPIP query and sends corresponding JPT/JPP-stream.
|
* The JPIP server parses JPIP query and sends corresponding JPT/JPP-stream.
|
||||||
* The JPIP client viewer is an image viewer with GUI to publish JPIP requests and receive JPT/JPP-stream.\n
|
* The JPIP client viewer is an image viewer with GUI to publish JPIP requests and receive JPT/JPP-stream.\n
|
||||||
|
@ -1256,7 +1256,7 @@ int imagetopgx(opj_image_t * image, const char *outfile)
|
|||||||
strncpy(name, outfile, dotpos);
|
strncpy(name, outfile, dotpos);
|
||||||
sprintf(name+dotpos, "_%d.pgx", compno);
|
sprintf(name+dotpos, "_%d.pgx", compno);
|
||||||
fdest = fopen(name, "wb");
|
fdest = fopen(name, "wb");
|
||||||
/* dont need name anymore */
|
/* don't need name anymore */
|
||||||
|
|
||||||
if (!fdest)
|
if (!fdest)
|
||||||
{
|
{
|
||||||
|
@ -1108,7 +1108,7 @@ static opj_image_t* upsample_image_components(opj_image_t* original)
|
|||||||
l_dst += l_new_cmp->w;
|
l_dst += l_new_cmp->w;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(l_new_cmp->h > (l_org_cmp->dy - 1U)) { /* check substraction overflow for really small images */
|
if(l_new_cmp->h > (l_org_cmp->dy - 1U)) { /* check subtraction overflow for really small images */
|
||||||
for (; y < l_new_cmp->h - (l_org_cmp->dy - 1U); y += l_org_cmp->dy) {
|
for (; y < l_new_cmp->h - (l_org_cmp->dy - 1U); y += l_org_cmp->dy) {
|
||||||
OPJ_UINT32 x, dy;
|
OPJ_UINT32 x, dy;
|
||||||
OPJ_UINT32 xorg;
|
OPJ_UINT32 xorg;
|
||||||
@ -1117,7 +1117,7 @@ static opj_image_t* upsample_image_components(opj_image_t* original)
|
|||||||
for (x = 0U; x < xoff; ++x) {
|
for (x = 0U; x < xoff; ++x) {
|
||||||
l_dst[x] = 0;
|
l_dst[x] = 0;
|
||||||
}
|
}
|
||||||
if (l_new_cmp->w > (l_org_cmp->dx - 1U)) { /* check substraction overflow for really small images */
|
if (l_new_cmp->w > (l_org_cmp->dx - 1U)) { /* check subtraction overflow for really small images */
|
||||||
for (; x < l_new_cmp->w - (l_org_cmp->dx - 1U); x += l_org_cmp->dx, ++xorg) {
|
for (; x < l_new_cmp->w - (l_org_cmp->dx - 1U); x += l_org_cmp->dx, ++xorg) {
|
||||||
OPJ_UINT32 dx;
|
OPJ_UINT32 dx;
|
||||||
for (dx = 0U; dx < l_org_cmp->dx; ++dx) {
|
for (dx = 0U; dx < l_org_cmp->dx; ++dx) {
|
||||||
@ -1145,7 +1145,7 @@ static opj_image_t* upsample_image_components(opj_image_t* original)
|
|||||||
for (x = 0U; x < xoff; ++x) {
|
for (x = 0U; x < xoff; ++x) {
|
||||||
l_dst[x] = 0;
|
l_dst[x] = 0;
|
||||||
}
|
}
|
||||||
if (l_new_cmp->w > (l_org_cmp->dx - 1U)) { /* check substraction overflow for really small images */
|
if (l_new_cmp->w > (l_org_cmp->dx - 1U)) { /* check subtraction overflow for really small images */
|
||||||
for (; x < l_new_cmp->w - (l_org_cmp->dx - 1U); x += l_org_cmp->dx, ++xorg) {
|
for (; x < l_new_cmp->w - (l_org_cmp->dx - 1U); x += l_org_cmp->dx, ++xorg) {
|
||||||
OPJ_UINT32 dx;
|
OPJ_UINT32 dx;
|
||||||
for (dx = 0U; dx < l_org_cmp->dx; ++dx) {
|
for (dx = 0U; dx < l_org_cmp->dx; ++dx) {
|
||||||
|
@ -243,7 +243,7 @@
|
|||||||
* Substitute for real dirent structure. Note that `d_name' field is a
|
* Substitute for real dirent structure. Note that `d_name' field is a
|
||||||
* true character array although we have it copied in the implementation
|
* true character array although we have it copied in the implementation
|
||||||
* dependent data. We could save some memory if we had declared `d_name'
|
* dependent data. We could save some memory if we had declared `d_name'
|
||||||
* as a pointer refering the name within implementation dependent data.
|
* as a pointer referring the name within implementation dependent data.
|
||||||
* We have not done that since some code may rely on sizeof(d_name) to be
|
* We have not done that since some code may rely on sizeof(d_name) to be
|
||||||
* something other than four. Besides, directory entries are typically so
|
* something other than four. Besides, directory entries are typically so
|
||||||
* small that it takes virtually no time to copy them from place to place.
|
* small that it takes virtually no time to copy them from place to place.
|
||||||
@ -411,7 +411,7 @@ static DIR *opendir(const char *dirname)
|
|||||||
* capacity of d_name with different macros and some systems do not define
|
* capacity of d_name with different macros and some systems do not define
|
||||||
* capacity at all (besides actual declaration of the field). If you really
|
* capacity at all (besides actual declaration of the field). If you really
|
||||||
* need to find out storage capacity of d_name then you might want to try
|
* need to find out storage capacity of d_name then you might want to try
|
||||||
* NAME_MAX macro. The NAME_MAX is defined in POSIX standard althought
|
* NAME_MAX macro. The NAME_MAX is defined in POSIX standard although
|
||||||
* there are many MS-DOS and MS-Windows implementations those do not define
|
* there are many MS-DOS and MS-Windows implementations those do not define
|
||||||
* it. There are also systems that declare d_name as "char d_name[1]" and
|
* it. There are also systems that declare d_name as "char d_name[1]" and
|
||||||
* then allocate suitable amount of memory at run-time. Thanks to Alain
|
* then allocate suitable amount of memory at run-time. Thanks to Alain
|
||||||
@ -466,7 +466,7 @@ readdir (DIR *dirp)
|
|||||||
/* fill in entry and return that */
|
/* fill in entry and return that */
|
||||||
#if defined(DIRENT_WIN32_INTERFACE)
|
#if defined(DIRENT_WIN32_INTERFACE)
|
||||||
if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) {
|
if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) {
|
||||||
/* Last file has been processed or an error occured */
|
/* Last file has been processed or an error occurred */
|
||||||
FindClose (dirp->search_handle);
|
FindClose (dirp->search_handle);
|
||||||
dirp->search_handle = INVALID_HANDLE_VALUE;
|
dirp->search_handle = INVALID_HANDLE_VALUE;
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
|
@ -242,7 +242,7 @@
|
|||||||
* Substitute for real dirent structure. Note that `d_name' field is a
|
* Substitute for real dirent structure. Note that `d_name' field is a
|
||||||
* true character array although we have it copied in the implementation
|
* true character array although we have it copied in the implementation
|
||||||
* dependent data. We could save some memory if we had declared `d_name'
|
* dependent data. We could save some memory if we had declared `d_name'
|
||||||
* as a pointer refering the name within implementation dependent data.
|
* as a pointer referring the name within implementation dependent data.
|
||||||
* We have not done that since some code may rely on sizeof(d_name) to be
|
* We have not done that since some code may rely on sizeof(d_name) to be
|
||||||
* something other than four. Besides, directory entries are typically so
|
* something other than four. Besides, directory entries are typically so
|
||||||
* small that it takes virtually no time to copy them from place to place.
|
* small that it takes virtually no time to copy them from place to place.
|
||||||
@ -410,7 +410,7 @@ static DIR *opendir(const char *dirname)
|
|||||||
* capacity of d_name with different macros and some systems do not define
|
* capacity of d_name with different macros and some systems do not define
|
||||||
* capacity at all (besides actual declaration of the field). If you really
|
* capacity at all (besides actual declaration of the field). If you really
|
||||||
* need to find out storage capacity of d_name then you might want to try
|
* need to find out storage capacity of d_name then you might want to try
|
||||||
* NAME_MAX macro. The NAME_MAX is defined in POSIX standard althought
|
* NAME_MAX macro. The NAME_MAX is defined in POSIX standard although
|
||||||
* there are many MS-DOS and MS-Windows implementations those do not define
|
* there are many MS-DOS and MS-Windows implementations those do not define
|
||||||
* it. There are also systems that declare d_name as "char d_name[1]" and
|
* it. There are also systems that declare d_name as "char d_name[1]" and
|
||||||
* then allocate suitable amount of memory at run-time. Thanks to Alain
|
* then allocate suitable amount of memory at run-time. Thanks to Alain
|
||||||
@ -465,7 +465,7 @@ readdir (DIR *dirp)
|
|||||||
/* fill in entry and return that */
|
/* fill in entry and return that */
|
||||||
#if defined(DIRENT_WIN32_INTERFACE)
|
#if defined(DIRENT_WIN32_INTERFACE)
|
||||||
if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) {
|
if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) {
|
||||||
/* Last file has been processed or an error occured */
|
/* Last file has been processed or an error occurred */
|
||||||
FindClose (dirp->search_handle);
|
FindClose (dirp->search_handle);
|
||||||
dirp->search_handle = INVALID_HANDLE_VALUE;
|
dirp->search_handle = INVALID_HANDLE_VALUE;
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
|
@ -1436,7 +1436,7 @@ int imagetopgx(opj_image_t * image, const char *outfile) {
|
|||||||
fprintf(stderr, "ERROR -> failed to open %s for writing\n", name);
|
fprintf(stderr, "ERROR -> failed to open %s for writing\n", name);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/* dont need name anymore */
|
/* don't need name anymore */
|
||||||
if( total > 256 ) {
|
if( total > 256 ) {
|
||||||
free(name);
|
free(name);
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ static void encode_help_display(void) {
|
|||||||
fprintf(stdout," Indicate multiple modes by adding their values. \n");
|
fprintf(stdout," Indicate multiple modes by adding their values. \n");
|
||||||
fprintf(stdout," ex: RESTART(4) + RESET(2) + SEGMARK(32) = -M 38\n");
|
fprintf(stdout," ex: RESTART(4) + RESET(2) + SEGMARK(32) = -M 38\n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout,"-TP : devide packets of every tile into tile-parts (-TP R) [R, L, C]\n");
|
fprintf(stdout,"-TP : divide packets of every tile into tile-parts (-TP R) [R, L, C]\n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout,"-x : create an index file *.Idx (-x index_name.Idx) \n");
|
fprintf(stdout,"-x : create an index file *.Idx (-x index_name.Idx) \n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
|
@ -243,7 +243,7 @@
|
|||||||
* Substitute for real dirent structure. Note that `d_name' field is a
|
* Substitute for real dirent structure. Note that `d_name' field is a
|
||||||
* true character array although we have it copied in the implementation
|
* true character array although we have it copied in the implementation
|
||||||
* dependent data. We could save some memory if we had declared `d_name'
|
* dependent data. We could save some memory if we had declared `d_name'
|
||||||
* as a pointer refering the name within implementation dependent data.
|
* as a pointer referring the name within implementation dependent data.
|
||||||
* We have not done that since some code may rely on sizeof(d_name) to be
|
* We have not done that since some code may rely on sizeof(d_name) to be
|
||||||
* something other than four. Besides, directory entries are typically so
|
* something other than four. Besides, directory entries are typically so
|
||||||
* small that it takes virtually no time to copy them from place to place.
|
* small that it takes virtually no time to copy them from place to place.
|
||||||
@ -411,7 +411,7 @@ static DIR *opendir(const char *dirname)
|
|||||||
* capacity of d_name with different macros and some systems do not define
|
* capacity of d_name with different macros and some systems do not define
|
||||||
* capacity at all (besides actual declaration of the field). If you really
|
* capacity at all (besides actual declaration of the field). If you really
|
||||||
* need to find out storage capacity of d_name then you might want to try
|
* need to find out storage capacity of d_name then you might want to try
|
||||||
* NAME_MAX macro. The NAME_MAX is defined in POSIX standard althought
|
* NAME_MAX macro. The NAME_MAX is defined in POSIX standard although
|
||||||
* there are many MS-DOS and MS-Windows implementations those do not define
|
* there are many MS-DOS and MS-Windows implementations those do not define
|
||||||
* it. There are also systems that declare d_name as "char d_name[1]" and
|
* it. There are also systems that declare d_name as "char d_name[1]" and
|
||||||
* then allocate suitable amount of memory at run-time. Thanks to Alain
|
* then allocate suitable amount of memory at run-time. Thanks to Alain
|
||||||
@ -466,7 +466,7 @@ readdir (DIR *dirp)
|
|||||||
/* fill in entry and return that */
|
/* fill in entry and return that */
|
||||||
#if defined(DIRENT_WIN32_INTERFACE)
|
#if defined(DIRENT_WIN32_INTERFACE)
|
||||||
if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) {
|
if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) {
|
||||||
/* Last file has been processed or an error occured */
|
/* Last file has been processed or an error occurred */
|
||||||
FindClose (dirp->search_handle);
|
FindClose (dirp->search_handle);
|
||||||
dirp->search_handle = INVALID_HANDLE_VALUE;
|
dirp->search_handle = INVALID_HANDLE_VALUE;
|
||||||
errno = ENOENT;
|
errno = ENOENT;
|
||||||
|
@ -375,7 +375,7 @@ void xml_write_free_and_skip(FILE* xmlout, opj_mj2_t * movie) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void xml_write_uuid(FILE* xmlout, opj_mj2_t * movie) {
|
void xml_write_uuid(FILE* xmlout, opj_mj2_t * movie) {
|
||||||
/* Univeral Unique IDs of 16 bytes. */
|
/* Universal Unique IDs of 16 bytes. */
|
||||||
#ifdef NOTYET
|
#ifdef NOTYET
|
||||||
/* NO-OP so far. There can be zero or more instances of private uuid boxes in a file.
|
/* NO-OP so far. There can be zero or more instances of private uuid boxes in a file.
|
||||||
This function supports the top level of the file, but uuid may be elsewhere [not yet supported].
|
This function supports the top level of the file, but uuid may be elsewhere [not yet supported].
|
||||||
@ -962,7 +962,7 @@ int xml_out_frame(FILE* file, FILE* xmlout, mj2_sample_t *sample, unsigned int s
|
|||||||
fprintf(xmlout, " <JP2_Frame Num=\"%d\">\n", snum+1);
|
fprintf(xmlout, " <JP2_Frame Num=\"%d\">\n", snum+1);
|
||||||
fprintf(xmlout, " <MainHeader>\n");
|
fprintf(xmlout, " <MainHeader>\n");
|
||||||
/* There can be multiple codestreams; a particular image is entirely within a single codestream */
|
/* There can be multiple codestreams; a particular image is entirely within a single codestream */
|
||||||
/* TO DO: A frame can be represented by two I-guess-contigious codestreams if its interleaved. */
|
/* TO DO: A frame can be represented by two I-guess-contiguous codestreams if its interleaved. */
|
||||||
fprintf(xmlout, " <StartOfCodestream Marker=\"SOC\" />\n");
|
fprintf(xmlout, " <StartOfCodestream Marker=\"SOC\" />\n");
|
||||||
/* "cp" stands for "coding parameter"; "tcp" is tile coding parameters, "tccp" is tile-component coding parameters */
|
/* "cp" stands for "coding parameter"; "tcp" is tile coding parameters, "tccp" is tile-component coding parameters */
|
||||||
xml_out_frame_siz(xmlout, img, cp); /* reqd in main */
|
xml_out_frame_siz(xmlout, img, cp); /* reqd in main */
|
||||||
|
@ -64,7 +64,7 @@ void help_display()
|
|||||||
fprintf(stdout,"----------\n");
|
fprintf(stdout,"----------\n");
|
||||||
fprintf(stdout,"The metadata includes the jp2 image and tile headers of the first frame.\n");
|
fprintf(stdout,"The metadata includes the jp2 image and tile headers of the first frame.\n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout,"Metadata values are shown in 'raw' form (e.g., hexidecimal) as stored in the\n");
|
fprintf(stdout,"Metadata values are shown in 'raw' form (e.g., hexadecimal) as stored in the\n");
|
||||||
fprintf(stdout,"file, and, if apt, in a 'derived' form that is more quickly grasped.\n");
|
fprintf(stdout,"file, and, if apt, in a 'derived' form that is more quickly grasped.\n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout,"Notes explaining the XML are embedded as terse comments. These include\n");
|
fprintf(stdout,"Notes explaining the XML are embedded as terse comments. These include\n");
|
||||||
|
@ -356,7 +356,7 @@ static void setparams(opj_mj2_t *movie, opj_image_t *image) {
|
|||||||
movie->tk[0].jp2_struct.enumcs = 18; /* YUV */
|
movie->tk[0].jp2_struct.enumcs = 18; /* YUV */
|
||||||
|
|
||||||
else
|
else
|
||||||
movie->tk[0].jp2_struct.enumcs = 0; /* Unkown profile */
|
movie->tk[0].jp2_struct.enumcs = 0; /* Unknown profile */
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
@ -8,4 +8,4 @@ Anybody. As the OpenJPEG library is released under the BSD license, anybody can
|
|||||||
|
|
||||||
Who is developing the library ?
|
Who is developing the library ?
|
||||||
===============================
|
===============================
|
||||||
The library is developed by the Communications and Remote Sensing Lab (TELE), in the Université Catholique de Louvain (UCL). The JPWL module is developped and maintained by the Digital Signal Processing Lab (DSPLab) of the University of Perugia, Italy (UNIPG). As our purpose is to make OpenJPEG really useful for those interested in the image compression field, any feedback/advices are obviously welcome ! We will do our best to handle them quickly.
|
The library is developed by the Communications and Remote Sensing Lab (TELE), in the Université Catholique de Louvain (UCL). The JPWL module is developed and maintained by the Digital Signal Processing Lab (DSPLab) of the University of Perugia, Italy (UNIPG). As our purpose is to make OpenJPEG really useful for those interested in the image compression field, any feedback/advices are obviously welcome ! We will do our best to handle them quickly.
|
||||||
|
@ -184,7 +184,7 @@ void opj_write_bytes_BE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_n
|
|||||||
* @param p_buffer pointer the data buffer to read data from.
|
* @param p_buffer pointer the data buffer to read data from.
|
||||||
* @param p_value pointer to the value that will store the data.
|
* @param p_value pointer to the value that will store the data.
|
||||||
* @param p_nb_bytes the nb bytes to read.
|
* @param p_nb_bytes the nb bytes to read.
|
||||||
* @return the number of bytes read or -1 if an error occured.
|
* @return the number of bytes read or -1 if an error occurred.
|
||||||
*/
|
*/
|
||||||
void opj_read_bytes_BE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT32 p_nb_bytes);
|
void opj_read_bytes_BE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT32 p_nb_bytes);
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ void opj_read_bytes_BE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT
|
|||||||
* @param p_buffer pointer the data buffer to write data to.
|
* @param p_buffer pointer the data buffer to write data to.
|
||||||
* @param p_value the value to write
|
* @param p_value the value to write
|
||||||
* @param p_nb_bytes the number of bytes to write
|
* @param p_nb_bytes the number of bytes to write
|
||||||
* @return the number of bytes written or -1 if an error occured
|
* @return the number of bytes written or -1 if an error occurred
|
||||||
*/
|
*/
|
||||||
void opj_write_bytes_LE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes);
|
void opj_write_bytes_LE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_nb_bytes);
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ void opj_write_bytes_LE (OPJ_BYTE * p_buffer, OPJ_UINT32 p_value, OPJ_UINT32 p_n
|
|||||||
* @param p_buffer pointer the data buffer to read data from.
|
* @param p_buffer pointer the data buffer to read data from.
|
||||||
* @param p_value pointer to the value that will store the data.
|
* @param p_value pointer to the value that will store the data.
|
||||||
* @param p_nb_bytes the nb bytes to read.
|
* @param p_nb_bytes the nb bytes to read.
|
||||||
* @return the number of bytes read or -1 if an error occured.
|
* @return the number of bytes read or -1 if an error occurred.
|
||||||
*/
|
*/
|
||||||
void opj_read_bytes_LE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT32 p_nb_bytes);
|
void opj_read_bytes_LE(const OPJ_BYTE * p_buffer, OPJ_UINT32 * p_value, OPJ_UINT32 p_nb_bytes);
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ void opj_write_float_BE(OPJ_BYTE * p_buffer, OPJ_FLOAT32 p_value);
|
|||||||
* @param p_buffer pointer to the data buffer that will receive the data.
|
* @param p_buffer pointer to the data buffer that will receive the data.
|
||||||
* @param p_size number of bytes to read.
|
* @param p_size number of bytes to read.
|
||||||
* @param p_event_mgr the user event manager to be notified of special events.
|
* @param p_event_mgr the user event manager to be notified of special events.
|
||||||
* @return the number of bytes read, or -1 if an error occured or if the stream is at the end.
|
* @return the number of bytes read, or -1 if an error occurred or if the stream is at the end.
|
||||||
*/
|
*/
|
||||||
OPJ_SIZE_T opj_stream_read_data (opj_stream_private_t * p_stream,OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
|
OPJ_SIZE_T opj_stream_read_data (opj_stream_private_t * p_stream,OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ OPJ_SIZE_T opj_stream_read_data (opj_stream_private_t * p_stream,OPJ_BYTE * p_bu
|
|||||||
* @param p_buffer pointer to the data buffer holds the data to be writtent.
|
* @param p_buffer pointer to the data buffer holds the data to be writtent.
|
||||||
* @param p_size number of bytes to write.
|
* @param p_size number of bytes to write.
|
||||||
* @param p_event_mgr the user event manager to be notified of special events.
|
* @param p_event_mgr the user event manager to be notified of special events.
|
||||||
* @return the number of bytes writtent, or -1 if an error occured.
|
* @return the number of bytes writtent, or -1 if an error occurred.
|
||||||
*/
|
*/
|
||||||
OPJ_SIZE_T opj_stream_write_data (opj_stream_private_t * p_stream,const OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
|
OPJ_SIZE_T opj_stream_write_data (opj_stream_private_t * p_stream,const OPJ_BYTE * p_buffer, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ OPJ_BOOL opj_stream_flush (opj_stream_private_t * p_stream, struct opj_event_mgr
|
|||||||
* @param p_stream the stream to skip data from.
|
* @param p_stream the stream to skip data from.
|
||||||
* @param p_size the number of bytes to skip.
|
* @param p_size the number of bytes to skip.
|
||||||
* @param p_event_mgr the user event manager to be notified of special events.
|
* @param p_event_mgr the user event manager to be notified of special events.
|
||||||
* @return the number of bytes skipped, or -1 if an error occured.
|
* @return the number of bytes skipped, or -1 if an error occurred.
|
||||||
*/
|
*/
|
||||||
OPJ_OFF_T opj_stream_skip (opj_stream_private_t * p_stream,OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
OPJ_OFF_T opj_stream_skip (opj_stream_private_t * p_stream,OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ OPJ_OFF_T opj_stream_get_number_byte_left (const opj_stream_private_t * p_stream
|
|||||||
* @param p_stream the stream to skip data from.
|
* @param p_stream the stream to skip data from.
|
||||||
* @param p_size the number of bytes to skip.
|
* @param p_size the number of bytes to skip.
|
||||||
* @param p_event_mgr the user event manager to be notified of special events.
|
* @param p_event_mgr the user event manager to be notified of special events.
|
||||||
* @return the number of bytes skipped, or -1 if an error occured.
|
* @return the number of bytes skipped, or -1 if an error occurred.
|
||||||
*/
|
*/
|
||||||
OPJ_OFF_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
OPJ_OFF_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ OPJ_OFF_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_si
|
|||||||
* @param p_stream the stream to skip data from.
|
* @param p_stream the stream to skip data from.
|
||||||
* @param p_size the number of bytes to skip.
|
* @param p_size the number of bytes to skip.
|
||||||
* @param p_event_mgr the user event manager to be notified of special events.
|
* @param p_event_mgr the user event manager to be notified of special events.
|
||||||
* @return the number of bytes skipped, or -1 if an error occured.
|
* @return the number of bytes skipped, or -1 if an error occurred.
|
||||||
*/
|
*/
|
||||||
OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz
|
|||||||
* @param p_stream the stream to skip data from.
|
* @param p_stream the stream to skip data from.
|
||||||
* @param p_size the number of bytes to skip.
|
* @param p_size the number of bytes to skip.
|
||||||
* @param p_event_mgr the user event manager to be notified of special events.
|
* @param p_event_mgr the user event manager to be notified of special events.
|
||||||
* @return OPJ_TRUE if success, or OPJ_FALSE if an error occured.
|
* @return OPJ_TRUE if success, or OPJ_FALSE if an error occurred.
|
||||||
*/
|
*/
|
||||||
OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size
|
|||||||
* @param p_stream the stream to skip data from.
|
* @param p_stream the stream to skip data from.
|
||||||
* @param p_size the number of bytes to skip.
|
* @param p_size the number of bytes to skip.
|
||||||
* @param p_event_mgr the user event manager to be notified of special events.
|
* @param p_event_mgr the user event manager to be notified of special events.
|
||||||
* @return the number of bytes skipped, or -1 if an error occured.
|
* @return the number of bytes skipped, or -1 if an error occurred.
|
||||||
*/
|
*/
|
||||||
OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
||||||
|
|
||||||
|
@ -54,14 +54,14 @@ DWT.C are used by some function in TCD.C.
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
Forward 5-3 wavelet tranform in 2-D.
|
Forward 5-3 wavelet transform in 2-D.
|
||||||
Apply a reversible DWT transform to a component of an image.
|
Apply a reversible DWT transform to a component of an image.
|
||||||
@param tilec Tile component information (current tile)
|
@param tilec Tile component information (current tile)
|
||||||
*/
|
*/
|
||||||
OPJ_BOOL opj_dwt_encode(opj_tcd_tilecomp_t * tilec);
|
OPJ_BOOL opj_dwt_encode(opj_tcd_tilecomp_t * tilec);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Inverse 5-3 wavelet tranform in 2-D.
|
Inverse 5-3 wavelet transform in 2-D.
|
||||||
Apply a reversible inverse DWT transform to a component of an image.
|
Apply a reversible inverse DWT transform to a component of an image.
|
||||||
@param tilec Tile component information (current tile)
|
@param tilec Tile component information (current tile)
|
||||||
@param numres Number of resolution levels to decode
|
@param numres Number of resolution levels to decode
|
||||||
|
@ -108,7 +108,7 @@ int opj_write_phix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused,
|
|||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wriet manifest box (box)
|
* Write manifest box (box)
|
||||||
*
|
*
|
||||||
* @param[in] second number to be visited
|
* @param[in] second number to be visited
|
||||||
* @param[in] v number of boxes
|
* @param[in] v number of boxes
|
||||||
|
@ -125,7 +125,7 @@ static OPJ_BOOL opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations,
|
|||||||
{
|
{
|
||||||
*tmpPermutations++ = i;
|
*tmpPermutations++ = i;
|
||||||
}
|
}
|
||||||
/* now make a pivot with colum switch */
|
/* now make a pivot with column switch */
|
||||||
tmpPermutations = permutations;
|
tmpPermutations = permutations;
|
||||||
for (k = 0; k < lLastColum; ++k) {
|
for (k = 0; k < lLastColum; ++k) {
|
||||||
p = 0.0;
|
p = 0.0;
|
||||||
|
@ -4351,7 +4351,7 @@ static OPJ_BOOL opj_j2k_read_sod (opj_j2k_t *p_j2k,
|
|||||||
}
|
}
|
||||||
if (! *l_current_data) {
|
if (! *l_current_data) {
|
||||||
/* LH: oddly enough, in this path, l_tile_len!=0.
|
/* LH: oddly enough, in this path, l_tile_len!=0.
|
||||||
* TODO: If this was consistant, we could simplify the code to only use realloc(), as realloc(0,...) default to malloc(0,...).
|
* TODO: If this was consistent, we could simplify the code to only use realloc(), as realloc(0,...) default to malloc(0,...).
|
||||||
*/
|
*/
|
||||||
*l_current_data = (OPJ_BYTE*) opj_malloc(p_j2k->m_specific_param.m_decoder.m_sot_length);
|
*l_current_data = (OPJ_BYTE*) opj_malloc(p_j2k->m_specific_param.m_decoder.m_sot_length);
|
||||||
}
|
}
|
||||||
@ -5583,7 +5583,7 @@ static OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k,
|
|||||||
opj_write_bytes(l_current_data,l_mco_size-2,2); /* Lmco */
|
opj_write_bytes(l_current_data,l_mco_size-2,2); /* Lmco */
|
||||||
l_current_data += 2;
|
l_current_data += 2;
|
||||||
|
|
||||||
opj_write_bytes(l_current_data,l_tcp->m_nb_mcc_records,1); /* Nmco : only one tranform stage*/
|
opj_write_bytes(l_current_data,l_tcp->m_nb_mcc_records,1); /* Nmco : only one transform stage*/
|
||||||
++l_current_data;
|
++l_current_data;
|
||||||
|
|
||||||
l_mcc_record = l_tcp->m_mcc_records;
|
l_mcc_record = l_tcp->m_mcc_records;
|
||||||
@ -5635,7 +5635,7 @@ static OPJ_BOOL opj_j2k_read_mco ( opj_j2k_t *p_j2k,
|
|||||||
return OPJ_FALSE;
|
return OPJ_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_read_bytes(p_header_data,&l_nb_stages,1); /* Nmco : only one tranform stage*/
|
opj_read_bytes(p_header_data,&l_nb_stages,1); /* Nmco : only one transform stage*/
|
||||||
++p_header_data;
|
++p_header_data;
|
||||||
|
|
||||||
if (l_nb_stages > 1) {
|
if (l_nb_stages > 1) {
|
||||||
|
@ -170,7 +170,7 @@ static OPJ_BOOL opj_jp2_skip_jp2c( opj_jp2_t *jp2,
|
|||||||
* @param p_header_size the size of the data contained in the file header box.
|
* @param p_header_size the size of the data contained in the file header box.
|
||||||
* @param p_manager the user event manager.
|
* @param p_manager the user event manager.
|
||||||
*
|
*
|
||||||
* @return true if the JP2 Header box was successfully reconized.
|
* @return true if the JP2 Header box was successfully recognized.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_read_jp2h( opj_jp2_t *jp2,
|
static OPJ_BOOL opj_jp2_read_jp2h( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE *p_header_data,
|
OPJ_BYTE *p_header_data,
|
||||||
@ -370,7 +370,7 @@ static OPJ_BOOL opj_jp2_exec ( opj_jp2_t * jp2,
|
|||||||
* @param p_number_bytes_read pointer to an int that will store the number of bytes read from the stream (shoul usually be 2).
|
* @param p_number_bytes_read pointer to an int that will store the number of bytes read from the stream (shoul usually be 2).
|
||||||
* @param p_manager user event manager.
|
* @param p_manager user event manager.
|
||||||
*
|
*
|
||||||
* @return true if the box is reconized, false otherwise
|
* @return true if the box is recognized, false otherwise
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box,
|
static OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box,
|
||||||
OPJ_UINT32 * p_number_bytes_read,
|
OPJ_UINT32 * p_number_bytes_read,
|
||||||
@ -437,7 +437,7 @@ static const opj_jp2_header_handler_t jp2_img_header [] =
|
|||||||
* @param p_box_max_size the maximum number of bytes in the box.
|
* @param p_box_max_size the maximum number of bytes in the box.
|
||||||
* @param p_manager FIXME DOC
|
* @param p_manager FIXME DOC
|
||||||
*
|
*
|
||||||
* @return true if the box is reconized, false otherwise
|
* @return true if the box is recognized, false otherwise
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_read_boxhdr_char( opj_jp2_box_t *box,
|
static OPJ_BOOL opj_jp2_read_boxhdr_char( opj_jp2_box_t *box,
|
||||||
OPJ_BYTE * p_data,
|
OPJ_BYTE * p_data,
|
||||||
@ -2474,7 +2474,7 @@ static OPJ_BOOL opj_jpip_skip_iptr( opj_jp2_t *jp2,
|
|||||||
* @param p_header_size the size of the data contained in the file header box.
|
* @param p_header_size the size of the data contained in the file header box.
|
||||||
* @param p_manager the user event manager.
|
* @param p_manager the user event manager.
|
||||||
*
|
*
|
||||||
* @return true if the JP2 Header box was successfully reconized.
|
* @return true if the JP2 Header box was successfully recognized.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_read_jp2h( opj_jp2_t *jp2,
|
static OPJ_BOOL opj_jp2_read_jp2h( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE *p_header_data,
|
OPJ_BYTE *p_header_data,
|
||||||
|
@ -90,7 +90,7 @@ typedef enum
|
|||||||
JP2_IMG_STATE;
|
JP2_IMG_STATE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Channel description: channel index, type, assocation
|
Channel description: channel index, type, association
|
||||||
*/
|
*/
|
||||||
typedef struct opj_jp2_cdef_info
|
typedef struct opj_jp2_cdef_info
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ const OPJ_FLOAT64 * opj_mct_get_mct_norms_real ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Foward reversible MCT. */
|
/* Forward reversible MCT. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
#ifdef __SSE2__
|
#ifdef __SSE2__
|
||||||
void opj_mct_encode(
|
void opj_mct_encode(
|
||||||
@ -202,7 +202,7 @@ OPJ_FLOAT64 opj_mct_getnorm(OPJ_UINT32 compno) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Foward irreversible MCT. */
|
/* Forward irreversible MCT. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
#ifdef __SSE4_1__
|
#ifdef __SSE4_1__
|
||||||
void opj_mct_encode_real(
|
void opj_mct_encode_real(
|
||||||
|
@ -97,7 +97,7 @@ The following ifdef block is the standard way of creating macros which make expo
|
|||||||
from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
|
from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
|
||||||
symbol defined on the command line. this symbol should not be defined on any project
|
symbol defined on the command line. this symbol should not be defined on any project
|
||||||
that uses this DLL. This way any other project whose source files include this file see
|
that uses this DLL. This way any other project whose source files include this file see
|
||||||
OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
|
OPJ_API functions as being imported from a DLL, whereas this DLL sees symbols
|
||||||
defined with this macro as being exported.
|
defined with this macro as being exported.
|
||||||
*/
|
*/
|
||||||
# if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
|
# if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
|
||||||
@ -850,7 +850,7 @@ typedef struct opj_codestream_info {
|
|||||||
} opj_codestream_info_t;
|
} opj_codestream_info_t;
|
||||||
|
|
||||||
/* <----------------------------------------------------------- */
|
/* <----------------------------------------------------------- */
|
||||||
/* new output managment of the codestream information and index */
|
/* new output management of the codestream information and index */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tile-component coding parameters information
|
* Tile-component coding parameters information
|
||||||
@ -1347,7 +1347,7 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,
|
|||||||
opj_stream_t *p_stream );
|
opj_stream_t *p_stream );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads a tile header. This function is compulsory and allows one to know the size of the tile thta will be decoded.
|
* Reads a tile header. This function is compulsory and allows one to know the size of the tile that will be decoded.
|
||||||
* The user may need to refer to the image got by opj_read_header to understand the size being taken by the tile.
|
* The user may need to refer to the image got by opj_read_header to understand the size being taken by the tile.
|
||||||
*
|
*
|
||||||
* @param p_codec the jpeg2000 codec.
|
* @param p_codec the jpeg2000 codec.
|
||||||
|
@ -79,7 +79,7 @@ void * OPJ_CALLCONV opj_calloc(size_t _NumOfElements, size_t _SizeOfElements);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Allocate memory aligned to a 16 byte boundry
|
Allocate memory aligned to a 16 byte boundary
|
||||||
@param size Bytes to allocate
|
@param size Bytes to allocate
|
||||||
@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available
|
@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available
|
||||||
*/
|
*/
|
||||||
|
@ -73,7 +73,7 @@ Packet iterator
|
|||||||
typedef struct opj_pi_iterator {
|
typedef struct opj_pi_iterator {
|
||||||
/** Enabling Tile part generation*/
|
/** Enabling Tile part generation*/
|
||||||
OPJ_BYTE tp_on;
|
OPJ_BYTE tp_on;
|
||||||
/** precise if the packet has been already used (usefull for progression order change) */
|
/** precise if the packet has been already used (useful for progression order change) */
|
||||||
OPJ_INT16 *include;
|
OPJ_INT16 *include;
|
||||||
/** layer step used to localize the packet in the include vector */
|
/** layer step used to localize the packet in the include vector */
|
||||||
OPJ_UINT32 step_l;
|
OPJ_UINT32 step_l;
|
||||||
|
@ -296,7 +296,7 @@ OPJ_UINT32 opj_tcd_get_decoded_tile_size (opj_tcd_t *p_tcd );
|
|||||||
* @param p_data_written pointer to an int that is incremented by the number of bytes really written on p_dest
|
* @param p_data_written pointer to an int that is incremented by the number of bytes really written on p_dest
|
||||||
* @param p_len Maximum length of the destination buffer
|
* @param p_len Maximum length of the destination buffer
|
||||||
* @param p_cstr_info Codestream information structure
|
* @param p_cstr_info Codestream information structure
|
||||||
* @return true if the coding is successfull.
|
* @return true if the coding is successful.
|
||||||
*/
|
*/
|
||||||
OPJ_BOOL opj_tcd_encode_tile( opj_tcd_t *p_tcd,
|
OPJ_BOOL opj_tcd_encode_tile( opj_tcd_t *p_tcd,
|
||||||
OPJ_UINT32 p_tile_no,
|
OPJ_UINT32 p_tile_no,
|
||||||
|
@ -65,7 +65,7 @@ Write some bytes
|
|||||||
@param cio CIO handle
|
@param cio CIO handle
|
||||||
@param v Value to write
|
@param v Value to write
|
||||||
@param n Number of bytes to write
|
@param n Number of bytes to write
|
||||||
@return Returns the number of bytes written or 0 if an error occured
|
@return Returns the number of bytes written or 0 if an error occurred
|
||||||
*/
|
*/
|
||||||
unsigned int cio_write(opj_cio_t *cio, unsigned int v, int n);
|
unsigned int cio_write(opj_cio_t *cio, unsigned int v, int n);
|
||||||
/**
|
/**
|
||||||
@ -86,7 +86,7 @@ Write some bytes
|
|||||||
@param cio CIO handle
|
@param cio CIO handle
|
||||||
@param v Signed integer value to write
|
@param v Signed integer value to write
|
||||||
@param n Number of bytes to write
|
@param n Number of bytes to write
|
||||||
@return Returns the number of bytes written or 0 if an error occured
|
@return Returns the number of bytes written or 0 if an error occurred
|
||||||
*/
|
*/
|
||||||
int cio_write_int(opj_cio_t *cio, int v, int n);
|
int cio_write_int(opj_cio_t *cio, int v, int n);
|
||||||
/**
|
/**
|
||||||
|
@ -89,12 +89,12 @@ Inverse lazy transform (axial)
|
|||||||
*/
|
*/
|
||||||
static void dwt_interleave_z(int *a, int *b, int dn, int sn, int xy, int cas);
|
static void dwt_interleave_z(int *a, int *b, int dn, int sn, int xy, int cas);
|
||||||
/**
|
/**
|
||||||
Forward 5-3 wavelet tranform in 1-D
|
Forward 5-3 wavelet transform in 1-D
|
||||||
*/
|
*/
|
||||||
static void dwt_encode_53(int *a, int dn, int sn, int cas);
|
static void dwt_encode_53(int *a, int dn, int sn, int cas);
|
||||||
static void dwt_encode_97(int *a, int dn, int sn, int cas);
|
static void dwt_encode_97(int *a, int dn, int sn, int cas);
|
||||||
/**
|
/**
|
||||||
Inverse 5-3 wavelet tranform in 1-D
|
Inverse 5-3 wavelet transform in 1-D
|
||||||
*/
|
*/
|
||||||
static void dwt_decode_53(int *a, int dn, int sn, int cas);
|
static void dwt_decode_53(int *a, int dn, int sn, int cas);
|
||||||
static void dwt_decode_97(int *a, int dn, int sn, int cas);
|
static void dwt_decode_97(int *a, int dn, int sn, int cas);
|
||||||
@ -333,7 +333,7 @@ static void dwt_interleave_z(int *a, int *b, int dn, int sn, int xy, int cas) {
|
|||||||
|
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Forward 5-3 or 9-7 wavelet tranform in 1-D. */
|
/* Forward 5-3 or 9-7 wavelet transform in 1-D. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
static void dwt_encode_53(int *a, int dn, int sn, int cas) {
|
static void dwt_encode_53(int *a, int dn, int sn, int cas) {
|
||||||
int i;
|
int i;
|
||||||
@ -409,7 +409,7 @@ static void dwt_encode_97(int *a, int dn, int sn, int cas) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Inverse 5-3 or 9-7 wavelet tranform in 1-D. */
|
/* Inverse 5-3 or 9-7 wavelet transform in 1-D. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
static void dwt_decode_53(int *a, int dn, int sn, int cas) {
|
static void dwt_decode_53(int *a, int dn, int sn, int cas) {
|
||||||
int i;
|
int i;
|
||||||
@ -661,7 +661,7 @@ static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno
|
|||||||
==========================================================
|
==========================================================
|
||||||
*/
|
*/
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Forward 5-3 wavelet tranform in 3-D. */
|
/* Forward 5-3 wavelet transform in 3-D. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
void dwt_encode(opj_tcd_tilecomp_t * tilec, int dwtid[3]) {
|
void dwt_encode(opj_tcd_tilecomp_t * tilec, int dwtid[3]) {
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
@ -792,7 +792,7 @@ void dwt_encode(opj_tcd_tilecomp_t * tilec, int dwtid[3]) {
|
|||||||
|
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Inverse 5-3 wavelet tranform in 3-D. */
|
/* Inverse 5-3 wavelet transform in 3-D. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
void dwt_decode(opj_tcd_tilecomp_t * tilec, int stops[3], int dwtid[3]) {
|
void dwt_decode(opj_tcd_tilecomp_t * tilec, int stops[3], int dwtid[3]) {
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
@ -63,14 +63,14 @@ typedef struct opj_wtfilt {
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
Forward 5-3 wavelet tranform in 3-D.
|
Forward 5-3 wavelet transform in 3-D.
|
||||||
Apply a reversible DWT transform to a component of an volume.
|
Apply a reversible DWT transform to a component of an volume.
|
||||||
@param tilec Tile component information (current tile)
|
@param tilec Tile component information (current tile)
|
||||||
@param dwtid Number of identification of wavelet kernel(s) used in DWT in each direction
|
@param dwtid Number of identification of wavelet kernel(s) used in DWT in each direction
|
||||||
*/
|
*/
|
||||||
void dwt_encode(opj_tcd_tilecomp_t * tilec, int dwtid[3]);
|
void dwt_encode(opj_tcd_tilecomp_t * tilec, int dwtid[3]);
|
||||||
/**
|
/**
|
||||||
Inverse 5-3 wavelet tranform in 3-D.
|
Inverse 5-3 wavelet transform in 3-D.
|
||||||
Apply a reversible inverse DWT transform to a component of an volume.
|
Apply a reversible inverse DWT transform to a component of an volume.
|
||||||
@param tilec Tile component information (current tile)
|
@param tilec Tile component information (current tile)
|
||||||
@param stops Number of decoded resolution levels in each dimension
|
@param stops Number of decoded resolution levels in each dimension
|
||||||
|
@ -46,7 +46,7 @@ static const double mct_norms[3] = { 1.732, .8292, .8292 };
|
|||||||
static const double mct_norms_real[3] = { 1.732, 1.805, 1.573 };
|
static const double mct_norms_real[3] = { 1.732, 1.805, 1.573 };
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Foward reversible MCT. */
|
/* Forward reversible MCT. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
void mct_encode(int *c0, int *c1, int *c2, int n) {
|
void mct_encode(int *c0, int *c1, int *c2, int n) {
|
||||||
int i;
|
int i;
|
||||||
@ -91,7 +91,7 @@ double mct_getnorm(int compno) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Foward irreversible MCT. */
|
/* Forward irreversible MCT. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
void mct_encode_real(int *c0, int *c1, int *c2, int n) {
|
void mct_encode_real(int *c0, int *c1, int *c2, int n) {
|
||||||
int i;
|
int i;
|
||||||
|
@ -60,7 +60,7 @@ The following ifdef block is the standard way of creating macros which make expo
|
|||||||
from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
|
from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
|
||||||
symbol defined on the command line. this symbol should not be defined on any project
|
symbol defined on the command line. this symbol should not be defined on any project
|
||||||
that uses this DLL. This way any other project whose source files include this file see
|
that uses this DLL. This way any other project whose source files include this file see
|
||||||
OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
|
OPJ_API functions as being imported from a DLL, whereas this DLL sees symbols
|
||||||
defined with this macro as being exported.
|
defined with this macro as being exported.
|
||||||
*/
|
*/
|
||||||
#if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
|
#if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
|
||||||
|
@ -82,7 +82,7 @@ typedef struct opj_pi_comp {
|
|||||||
Packet iterator
|
Packet iterator
|
||||||
*/
|
*/
|
||||||
typedef struct opj_pi_iterator {
|
typedef struct opj_pi_iterator {
|
||||||
/** precise if the packet has been already used (usefull for progression order change) */
|
/** precise if the packet has been already used (useful for progression order change) */
|
||||||
short int *include;
|
short int *include;
|
||||||
/** layer step used to localize the packet in the include vector */
|
/** layer step used to localize the packet in the include vector */
|
||||||
int step_l;
|
int step_l;
|
||||||
|
@ -80,7 +80,7 @@ void print_cachemodel( cachemodel_param_t cachemodel);
|
|||||||
/**
|
/**
|
||||||
* search a cache model of a target
|
* search a cache model of a target
|
||||||
*
|
*
|
||||||
* @param[in] target refering target
|
* @param[in] target referring target
|
||||||
* @param[in] cachemodellist cache model list
|
* @param[in] cachemodellist cache model list
|
||||||
* @return found cache model pointer
|
* @return found cache model pointer
|
||||||
*/
|
*/
|
||||||
|
@ -357,7 +357,7 @@ void enqueue_precincts( int xmin, int xmax, int ymin, int ymax, int tile_id, int
|
|||||||
Byte4_t xminP, xmaxP, yminP, ymaxP;
|
Byte4_t xminP, xmaxP, yminP, ymaxP;
|
||||||
|
|
||||||
codeidx = msgqueue->cachemodel->target->codeidx;
|
codeidx = msgqueue->cachemodel->target->codeidx;
|
||||||
/* MM: shouldnt xmin/xmax be Byte4_t instead ? */
|
/* MM: shouldn't xmin/xmax be Byte4_t instead ? */
|
||||||
if( xmin < 0 || xmax < 0 || ymin < 0 || ymax < 0)
|
if( xmin < 0 || xmax < 0 || ymin < 0 || ymax < 0)
|
||||||
return;
|
return;
|
||||||
/* MM: I think the API should not really be int should it ? */
|
/* MM: I think the API should not really be int should it ? */
|
||||||
|
@ -46,7 +46,7 @@ typedef struct target_param{
|
|||||||
#endif
|
#endif
|
||||||
int csn; /**< codestream number */
|
int csn; /**< codestream number */
|
||||||
index_param_t *codeidx; /**< index information of codestream */
|
index_param_t *codeidx; /**< index information of codestream */
|
||||||
int num_of_use; /**< numbers of sessions refering to this target */
|
int num_of_use; /**< numbers of sessions referring to this target */
|
||||||
OPJ_BOOL jppstream; /**< if this target can return JPP-stream */
|
OPJ_BOOL jppstream; /**< if this target can return JPP-stream */
|
||||||
OPJ_BOOL jptstream; /**< if this target can return JPP-stream */
|
OPJ_BOOL jptstream; /**< if this target can return JPP-stream */
|
||||||
struct target_param *next; /**< pointer to the next target */
|
struct target_param *next; /**< pointer to the next target */
|
||||||
|
@ -357,7 +357,7 @@ opj_bool jpwl_correct(opj_j2k_t *j2k);
|
|||||||
@param post_len length of post_data
|
@param post_len length of post_data
|
||||||
@param conn is a pointer to the length of all connected (packed) EPBs
|
@param conn is a pointer to the length of all connected (packed) EPBs
|
||||||
@param L4_bufp is a pointer to the buffer pointer of redundancy data
|
@param L4_bufp is a pointer to the buffer pointer of redundancy data
|
||||||
@return returns true if correction could be succesfully performed
|
@return returns true if correction could be successfully performed
|
||||||
*/
|
*/
|
||||||
opj_bool jpwl_epb_correct(opj_j2k_t *j2k, unsigned char *buffer, int type, int pre_len, int post_len, int *conn,
|
opj_bool jpwl_epb_correct(opj_j2k_t *j2k, unsigned char *buffer, int type, int pre_len, int post_len, int *conn,
|
||||||
unsigned char **L4_bufp);
|
unsigned char **L4_bufp);
|
||||||
|
@ -225,7 +225,7 @@ void init_rs(int k)
|
|||||||
of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thus for
|
of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thus for
|
||||||
example the polynomial representation of @^5 would be given by the binary
|
example the polynomial representation of @^5 would be given by the binary
|
||||||
representation of the integer "alpha_to[5]".
|
representation of the integer "alpha_to[5]".
|
||||||
Similarily, index_of[] can be used as follows:
|
Similarly, index_of[] can be used as follows:
|
||||||
As above, let @ represent the primitive element of GF(2^m) that is
|
As above, let @ represent the primitive element of GF(2^m) that is
|
||||||
the root of the primitive polynomial p(x). In order to find the power
|
the root of the primitive polynomial p(x). In order to find the power
|
||||||
of @ (alpha) that has the polynomial representation
|
of @ (alpha) that has the polynomial representation
|
||||||
@ -237,7 +237,7 @@ void init_rs(int k)
|
|||||||
NOTE:
|
NOTE:
|
||||||
The element alpha_to[2^m-1] = 0 always signifying that the
|
The element alpha_to[2^m-1] = 0 always signifying that the
|
||||||
representation of "@^infinity" = 0 is (0,0,0,...,0).
|
representation of "@^infinity" = 0 is (0,0,0,...,0).
|
||||||
Similarily, the element index_of[0] = A0 always signifying
|
Similarly, the element index_of[0] = A0 always signifying
|
||||||
that the power of alpha which has the polynomial representation
|
that the power of alpha which has the polynomial representation
|
||||||
(0,0,...,0) is "infinity".
|
(0,0,...,0) is "infinity".
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ Write some bytes
|
|||||||
@param cio CIO handle
|
@param cio CIO handle
|
||||||
@param v Value to write
|
@param v Value to write
|
||||||
@param n Number of bytes to write
|
@param n Number of bytes to write
|
||||||
@return Returns the number of bytes written or 0 if an error occured
|
@return Returns the number of bytes written or 0 if an error occurred
|
||||||
*/
|
*/
|
||||||
OPJ_API unsigned int OPJ_CALLCONV cio_write(opj_cio_t *cio, unsigned int64 v, int n);
|
OPJ_API unsigned int OPJ_CALLCONV cio_write(opj_cio_t *cio, unsigned int64 v, int n);
|
||||||
/**
|
/**
|
||||||
|
@ -54,13 +54,13 @@ DWT.C are used by some function in TCD.C.
|
|||||||
/*@{*/
|
/*@{*/
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
Forward 5-3 wavelet tranform in 2-D.
|
Forward 5-3 wavelet transform in 2-D.
|
||||||
Apply a reversible DWT transform to a component of an image.
|
Apply a reversible DWT transform to a component of an image.
|
||||||
@param tilec Tile component information (current tile)
|
@param tilec Tile component information (current tile)
|
||||||
*/
|
*/
|
||||||
void dwt_encode(opj_tcd_tilecomp_t * tilec);
|
void dwt_encode(opj_tcd_tilecomp_t * tilec);
|
||||||
/**
|
/**
|
||||||
Inverse 5-3 wavelet tranform in 2-D.
|
Inverse 5-3 wavelet transform in 2-D.
|
||||||
Apply a reversible inverse DWT transform to a component of an image.
|
Apply a reversible inverse DWT transform to a component of an image.
|
||||||
@param tilec Tile component information (current tile)
|
@param tilec Tile component information (current tile)
|
||||||
@param numres Number of resolution levels to decode
|
@param numres Number of resolution levels to decode
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
Channel description: channel index, type, assocation
|
Channel description: channel index, type, association
|
||||||
*/
|
*/
|
||||||
typedef struct opj_jp2_cdef_info
|
typedef struct opj_jp2_cdef_info
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ static const double mct_norms[3] = { 1.732, .8292, .8292 };
|
|||||||
static const double mct_norms_real[3] = { 1.732, 1.805, 1.573 };
|
static const double mct_norms_real[3] = { 1.732, 1.805, 1.573 };
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Foward reversible MCT. */
|
/* Forward reversible MCT. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
void mct_encode(
|
void mct_encode(
|
||||||
int* restrict c0,
|
int* restrict c0,
|
||||||
@ -105,7 +105,7 @@ double mct_getnorm(int compno) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <summary> */
|
/* <summary> */
|
||||||
/* Foward irreversible MCT. */
|
/* Forward irreversible MCT. */
|
||||||
/* </summary> */
|
/* </summary> */
|
||||||
void mct_encode_real(
|
void mct_encode_real(
|
||||||
int* restrict c0,
|
int* restrict c0,
|
||||||
|
@ -62,7 +62,7 @@ The following ifdef block is the standard way of creating macros which make expo
|
|||||||
from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
|
from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
|
||||||
symbol defined on the command line. this symbol should not be defined on any project
|
symbol defined on the command line. this symbol should not be defined on any project
|
||||||
that uses this DLL. This way any other project whose source files include this file see
|
that uses this DLL. This way any other project whose source files include this file see
|
||||||
OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
|
OPJ_API functions as being imported from a DLL, whereas this DLL sees symbols
|
||||||
defined with this macro as being exported.
|
defined with this macro as being exported.
|
||||||
*/
|
*/
|
||||||
#if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
|
#if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
|
||||||
|
@ -64,7 +64,7 @@ void * OPJ_CALLCONV opj_calloc(size_t _NumOfElements, size_t _SizeOfElements);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Allocate memory aligned to a 16 byte boundry
|
Allocate memory aligned to a 16 byte boundary
|
||||||
@param size Bytes to allocate
|
@param size Bytes to allocate
|
||||||
@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available
|
@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available
|
||||||
*/
|
*/
|
||||||
|
@ -73,7 +73,7 @@ Packet iterator
|
|||||||
typedef struct opj_pi_iterator {
|
typedef struct opj_pi_iterator {
|
||||||
/** Enabling Tile part generation*/
|
/** Enabling Tile part generation*/
|
||||||
char tp_on;
|
char tp_on;
|
||||||
/** precise if the packet has been already used (usefull for progression order change) */
|
/** precise if the packet has been already used (useful for progression order change) */
|
||||||
short int *include;
|
short int *include;
|
||||||
/** layer step used to localize the packet in the include vector */
|
/** layer step used to localize the packet in the include vector */
|
||||||
int step_l;
|
int step_l;
|
||||||
|
@ -405,7 +405,7 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
|
|||||||
)
|
)
|
||||||
|
|
||||||
# FIXME: add a compare2base function base on raw which
|
# FIXME: add a compare2base function base on raw which
|
||||||
# can output png diff files if necesary
|
# can output png diff files if necessary
|
||||||
# add_test(NR-${filename}-compare2base
|
# add_test(NR-${filename}-compare2base
|
||||||
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
|
# ${EXECUTABLE_OUTPUT_PATH}/compare_images
|
||||||
# -b ${BASELINE_NR}/opj_${filenameRef}
|
# -b ${BASELINE_NR}/opj_${filenameRef}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This file list all the input commands of the tests run by the ctest command which
|
# This file list all the input commands of the tests run by the ctest command which
|
||||||
# are not related to the conformance files.
|
# are not related to the conformance files.
|
||||||
#
|
#
|
||||||
# For each line of this file (exept line which begin with #) an opj_compress test or a
|
# For each line of this file (except line which begin with #) an opj_compress test or a
|
||||||
# opj_decompress is run and its related tests.
|
# opj_decompress is run and its related tests.
|
||||||
# + For encoder related tests = dump, compare dump to base, decode the encoded file with
|
# + For encoder related tests = dump, compare dump to base, decode the encoded file with
|
||||||
# reference and compare the decoded file with the baseline decoded previously with
|
# reference and compare the decoded file with the baseline decoded previously with
|
||||||
|
@ -206,7 +206,7 @@ static void encode_help_display() {
|
|||||||
fprintf(stdout," Indicate multiple modes by adding their values. \n");
|
fprintf(stdout," Indicate multiple modes by adding their values. \n");
|
||||||
fprintf(stdout," ex: RESTART(4) + RESET(2) + SEGMARK(32) = -M 38\n");
|
fprintf(stdout," ex: RESTART(4) + RESET(2) + SEGMARK(32) = -M 38\n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout,"-TP : devide packets of every tile into tile-parts (-TP R) [R, L, C]\n");
|
fprintf(stdout,"-TP : divide packets of every tile into tile-parts (-TP R) [R, L, C]\n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
fprintf(stdout,"-x : create an index file *.Idx (-x index_name.Idx) \n");
|
fprintf(stdout,"-x : create an index file *.Idx (-x index_name.Idx) \n");
|
||||||
fprintf(stdout,"\n");
|
fprintf(stdout,"\n");
|
||||||
@ -1696,7 +1696,7 @@ static opj_image_t* loadImage(opj_cparameters_t *parameters, JNIEnv *env, jobjec
|
|||||||
len = (*env)->GetArrayLength(env, jba);
|
len = (*env)->GetArrayLength(env, jba);
|
||||||
|
|
||||||
jbBody = (*env)->GetPrimitiveArrayCritical(env, jba, &isCopy);
|
jbBody = (*env)->GetPrimitiveArrayCritical(env, jba, &isCopy);
|
||||||
/*printf("C: before transfering 8 bpp image\n");*/
|
/*printf("C: before transferring 8 bpp image\n");*/
|
||||||
if (comp->sgnd) {
|
if (comp->sgnd) {
|
||||||
for(i=0; i< len;i++) {
|
for(i=0; i< len;i++) {
|
||||||
comp->data[i] = (char) jbBody[i];
|
comp->data[i] = (char) jbBody[i];
|
||||||
@ -1715,7 +1715,7 @@ static opj_image_t* loadImage(opj_cparameters_t *parameters, JNIEnv *env, jobjec
|
|||||||
len = (*env)->GetArrayLength(env, jsa);
|
len = (*env)->GetArrayLength(env, jsa);
|
||||||
|
|
||||||
jsBody = (*env)->GetPrimitiveArrayCritical(env, jsa, &isCopy);
|
jsBody = (*env)->GetPrimitiveArrayCritical(env, jsa, &isCopy);
|
||||||
/*printf("C: before transfering 16 bpp image\n");*/
|
/*printf("C: before transferring 16 bpp image\n");*/
|
||||||
if (comp->sgnd) { /* Special behaviour to deal with signed elements ??*/
|
if (comp->sgnd) { /* Special behaviour to deal with signed elements ??*/
|
||||||
comp->data[i] = (short) jsBody[i];
|
comp->data[i] = (short) jsBody[i];
|
||||||
for(i=0; i< len;i++) {
|
for(i=0; i< len;i++) {
|
||||||
@ -1735,7 +1735,7 @@ static opj_image_t* loadImage(opj_cparameters_t *parameters, JNIEnv *env, jobjec
|
|||||||
shift = compno*8;
|
shift = compno*8;
|
||||||
|
|
||||||
jiBody = (*env)->GetPrimitiveArrayCritical(env, jia, &isCopy);
|
jiBody = (*env)->GetPrimitiveArrayCritical(env, jia, &isCopy);
|
||||||
/*printf("C: before transfering 24 bpp image (component %d, signed = %d)\n", compno, comp->sgnd);*/
|
/*printf("C: before transferring 24 bpp image (component %d, signed = %d)\n", compno, comp->sgnd);*/
|
||||||
if (comp->sgnd) { /* Special behaviour to deal with signed elements ?? XXXXX*/
|
if (comp->sgnd) { /* Special behaviour to deal with signed elements ?? XXXXX*/
|
||||||
for(i=0; i< len;i++) {
|
for(i=0; i< len;i++) {
|
||||||
comp->data[i] = ( ((int) jiBody[i]) & (0xFF << shift) ) >> shift;
|
comp->data[i] = ( ((int) jiBody[i]) & (0xFF << shift) ) >> shift;
|
||||||
|
@ -604,7 +604,7 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||||||
/*printf("C: %d bytes read from file\n",file_length);*/
|
/*printf("C: %d bytes read from file\n",file_length);*/
|
||||||
} else {
|
} else {
|
||||||
/* Preparing the transfer of the codestream from Java to C*/
|
/* Preparing the transfer of the codestream from Java to C*/
|
||||||
/*printf("C: before transfering codestream\n");*/
|
/*printf("C: before transferring codestream\n");*/
|
||||||
fid = (*env)->GetFieldID(env, cls,"compressedStream", "[B");
|
fid = (*env)->GetFieldID(env, cls,"compressedStream", "[B");
|
||||||
jba = (*env)->GetObjectField(env, obj, fid);
|
jba = (*env)->GetObjectField(env, obj, fid);
|
||||||
file_length = (*env)->GetArrayLength(env, jba);
|
file_length = (*env)->GetArrayLength(env, jba);
|
||||||
@ -782,7 +782,7 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||||||
jia = (*env)->GetObjectField(env, obj, fid);
|
jia = (*env)->GetObjectField(env, obj, fid);
|
||||||
jiBody = (*env)->GetIntArrayElements(env, jia, 0);
|
jiBody = (*env)->GetIntArrayElements(env, jia, 0);
|
||||||
ptrIBody = jiBody;
|
ptrIBody = jiBody;
|
||||||
printf("C: transfering image24: %d int to Java pointer=%d\n",image->numcomps*w*h, ptrIBody);
|
printf("C: transferring image24: %d int to Java pointer=%d\n",image->numcomps*w*h, ptrIBody);
|
||||||
|
|
||||||
for (i=0; i<w*h; i++) {
|
for (i=0; i<w*h; i++) {
|
||||||
tempUC = (unsigned char)(ptr[i]);
|
tempUC = (unsigned char)(ptr[i]);
|
||||||
@ -808,7 +808,7 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||||||
|
|
||||||
} else { /* 1 component 8 or 16 bpp image*/
|
} else { /* 1 component 8 or 16 bpp image*/
|
||||||
ptr = image->comps[0].data;
|
ptr = image->comps[0].data;
|
||||||
printf("C: before transfering a %d bpp image to java (length = %d)\n",image->comps[0].prec ,w*h);
|
printf("C: before transferring a %d bpp image to java (length = %d)\n",image->comps[0].prec ,w*h);
|
||||||
if (image->comps[0].prec<=8) {
|
if (image->comps[0].prec<=8) {
|
||||||
fid = (*env)->GetFieldID(env, cls,"image8", "[B");
|
fid = (*env)->GetFieldID(env, cls,"image8", "[B");
|
||||||
jba = (*env)->GetObjectField(env, obj, fid);
|
jba = (*env)->GetObjectField(env, obj, fid);
|
||||||
@ -823,7 +823,7 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||||||
max_value = 255;
|
max_value = 255;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/*printf("C: transfering %d shorts to Java image8 pointer = %d\n", wr*hr,ptrSBody);*/
|
/*printf("C: transferring %d shorts to Java image8 pointer = %d\n", wr*hr,ptrSBody);*/
|
||||||
for (i=0; i<w*h; i++) {
|
for (i=0; i<w*h; i++) {
|
||||||
tempUC = (unsigned char) (ptr[i]);
|
tempUC = (unsigned char) (ptr[i]);
|
||||||
#ifdef CHECK_THRESHOLDS
|
#ifdef CHECK_THRESHOLDS
|
||||||
@ -835,7 +835,7 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||||||
*(ptrBBody++) = tempUC;
|
*(ptrBBody++) = tempUC;
|
||||||
}
|
}
|
||||||
(*env)->ReleaseByteArrayElements(env, jba, jbBody, 0);
|
(*env)->ReleaseByteArrayElements(env, jba, jbBody, 0);
|
||||||
printf("C: image8 transfered to Java\n");
|
printf("C: image8 transferred to Java\n");
|
||||||
} else {
|
} else {
|
||||||
fid = (*env)->GetFieldID(env, cls,"image16", "[S");
|
fid = (*env)->GetFieldID(env, cls,"image16", "[S");
|
||||||
jsa = (*env)->GetObjectField(env, obj, fid);
|
jsa = (*env)->GetObjectField(env, obj, fid);
|
||||||
@ -851,7 +851,7 @@ JNIEXPORT jint JNICALL Java_org_openJpeg_OpenJPEGJavaDecoder_internalDecodeJ2Kto
|
|||||||
}
|
}
|
||||||
printf("C: minValue = %d, maxValue = %d\n", min_value, max_value);
|
printf("C: minValue = %d, maxValue = %d\n", min_value, max_value);
|
||||||
#endif
|
#endif
|
||||||
printf("C: transfering %d shorts to Java image16 pointer = %d\n", w*h,ptrSBody);
|
printf("C: transferring %d shorts to Java image16 pointer = %d\n", w*h,ptrSBody);
|
||||||
for (i=0; i<w*h; i++) {
|
for (i=0; i<w*h; i++) {
|
||||||
tempS = (short) (ptr[i]);
|
tempS = (short) (ptr[i]);
|
||||||
#ifdef CHECK_THRESHOLDS
|
#ifdef CHECK_THRESHOLDS
|
||||||
|
Loading…
Reference in New Issue
Block a user