Signed-off-by: Stefan Weil <sw@weilnetz.de>
24 files changed:
\fBchar\fR infile[OPJ_PATH_LEN];
/* output file name */
\fBchar\fR outfile[OPJ_PATH_LEN];
\fBchar\fR infile[OPJ_PATH_LEN];
/* output file name */
\fBchar\fR outfile[OPJ_PATH_LEN];
- /* DEPRECATED. Index generation is now handeld with the
+ /* DEPRECATED. Index generation is now handled with the
opj_encode_with_info() function. Set to NULL */
\fBint\fR index_on;
opj_encode_with_info() function. Set to NULL */
\fBint\fR index_on;
- /* DEPRECATED. Index generation is now handeld with the
+ /* DEPRECATED. Index generation is now handled with the
opj_encode_with_info() function. Set to NULL */
\fBchar\fR index[OPJ_PATH_LEN];
/* subimage encoding: origin image offset in x direction */
opj_encode_with_info() function. Set to NULL */
\fBchar\fR index[OPJ_PATH_LEN];
/* subimage encoding: origin image offset in x direction */
}/* while() */
if (written != width * height) {
}/* while() */
if (written != width * height) {
- fprintf(stderr, "warning, image's actual size does not match advertized one\n");
+ fprintf(stderr, "warning, image's actual size does not match advertised one\n");
}
} /* while(y < height) */
if (written != width * height) {
}
} /* while(y < height) */
if (written != width * height) {
- fprintf(stderr, "warning, image's actual size does not match advertized one\n");
+ fprintf(stderr, "warning, image's actual size does not match advertised one\n");
return OPJ_FALSE;
}
return OPJ_TRUE;
return OPJ_FALSE;
}
return OPJ_TRUE;
/* ----------------------------------------------------- */
/* ----------------------------------------------------- */
- case 'r': { /* rates rates/distorsion */
+ case 'r': { /* rates rates/distortion */
char *s = opj_optarg;
parameters->tcp_numlayers = 0;
while (sscanf(s, "%f", ¶meters->tcp_rates[parameters->tcp_numlayers]) ==
char *s = opj_optarg;
parameters->tcp_numlayers = 0;
while (sscanf(s, "%f", ¶meters->tcp_rates[parameters->tcp_numlayers]) ==
-// search first contiguos codestream box in an mj2 file
+// search first contiguous codestream box in an mj2 file
unsigned long int
searchjpeg2000c(wxInputStream& stream, unsigned long int fsize, int number)
{
unsigned long int
searchjpeg2000c(wxInputStream& stream, unsigned long int fsize, int number)
{
- text = wxT("Termination on each coding passs");
+ text = wxT("Termination on each coding pass");
else
text = wxT("No termination on each coding pass");
subcurrid4 = m_tree->AppendItem(subcurrid3,
else
text = wxT("No termination on each coding pass");
subcurrid4 = m_tree->AppendItem(subcurrid3,
- text = wxT("Termination on each coding passs");
+ text = wxT("Termination on each coding pass");
else
text = wxT("No termination on each coding pass");
subcurrid4 = m_tree->AppendItem(subcurrid3,
else
text = wxT("No termination on each coding pass");
subcurrid4 = m_tree->AppendItem(subcurrid3,
* X controls this value.
*
* Unstuffing prevent sequences that are more than 0xFF7F from appearing
* X controls this value.
*
* Unstuffing prevent sequences that are more than 0xFF7F from appearing
- * in the conpressed sequence. So whenever a value of 0xFF is coded, the
+ * in the compressed sequence. So whenever a value of 0xFF is coded, the
* MSB of the next byte is set 0 and must be ignored during decoding.
*
* Reading can go beyond the end of buffer by up to 3 bytes.
* MSB of the next byte is set 0 and must be ignored during decoding.
*
* Reading can go beyond the end of buffer by up to 3 bytes.
//************************************************************************/
/** @brief Allocates T1 buffers
*
//************************************************************************/
/** @brief Allocates T1 buffers
*
- * @param [in, out] t1 is codeblock cofficients storage
+ * @param [in, out] t1 is codeblock coefficients storage
* @param [in] w is codeblock width
* @param [in] h is codeblock height
*/
* @param [in] w is codeblock width
* @param [in] h is codeblock height
*/
/** @brief Decodes one codeblock, processing the cleanup, siginificance
* propagation, and magnitude refinement pass
*
/** @brief Decodes one codeblock, processing the cleanup, siginificance
* propagation, and magnitude refinement pass
*
- * @param [in, out] t1 is codeblock cofficients storage
+ * @param [in, out] t1 is codeblock coefficients storage
* @param [in] cblk is codeblock properties
* @param [in] orient is the subband to which the codeblock belongs (not needed)
* @param [in] roishift is region of interest shift
* @param [in] cblk is codeblock properties
* @param [in] orient is the subband to which the codeblock belongs (not needed)
* @param [in] roishift is region of interest shift
OPJ_OFF_T end_ph_pos;
/** packet end position */
OPJ_OFF_T end_pos;
OPJ_OFF_T end_ph_pos;
/** packet end position */
OPJ_OFF_T end_pos;
- /** packet distorsion */
+ /** packet distortion */
double disto;
} opj_packet_info_t;
double disto;
} opj_packet_info_t;
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef OPJ_COMMMON_H
-#define OPJ_COMMMON_H
+#ifndef OPJ_COMMON_H
+#define OPJ_COMMON_H
/*
==========================================================
/*
==========================================================
#define OPJ_COMP_PARAM_DEFAULT_PROG_ORDER OPJ_LRCP
#define OPJ_COMP_PARAM_DEFAULT_NUMRESOLUTION 6
#define OPJ_COMP_PARAM_DEFAULT_PROG_ORDER OPJ_LRCP
#define OPJ_COMP_PARAM_DEFAULT_NUMRESOLUTION 6
-#endif /* OPJ_COMMMON_H */
+#endif /* OPJ_COMMON_H */
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_WARNING,
opj_mutex_lock(p_manager_mutex);
}
opj_event_msg(p_manager, EVT_WARNING,
- "PTERM check failure: %d synthetized 0xFF markers read\n",
+ "PTERM check failure: %d synthesized 0xFF markers read\n",
mqc->end_of_byte_stream_counter);
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
mqc->end_of_byte_stream_counter);
if (p_manager_mutex) {
opj_mutex_unlock(p_manager_mutex);
/* ----------------------------------------------------------------------- */
/** Returns OPJ_TRUE if the layer allocation is unchanged w.r.t to the previous
/* ----------------------------------------------------------------------- */
/** Returns OPJ_TRUE if the layer allocation is unchanged w.r.t to the previous
- * invokation with a different threshold */
+ * invocation with a different threshold */
static
OPJ_BOOL opj_tcd_makelayer(opj_tcd_t *tcd,
OPJ_UINT32 layno,
static
OPJ_BOOL opj_tcd_makelayer(opj_tcd_t *tcd,
OPJ_UINT32 layno,
-/** Returns whether a tile componenent is fully decoded, taking into account
+/** Returns whether a tile component is fully decoded, taking into account
* p_tcd->win_* members.
*
* @param p_tcd TCD handle.
* @param compno Component number
* p_tcd->win_* members.
*
* @param p_tcd TCD handle.
* @param compno Component number
- * @return OPJ_TRUE whether the tile componenent is fully decoded
+ * @return OPJ_TRUE whether the tile component is fully decoded
*/
static OPJ_BOOL opj_tcd_is_whole_tilecomp_decoding(opj_tcd_t *p_tcd,
OPJ_UINT32 compno)
*/
static OPJ_BOOL opj_tcd_is_whole_tilecomp_decoding(opj_tcd_t *p_tcd,
OPJ_UINT32 compno)
/**
Dump the content of a tcd structure
*/
/**
Dump the content of a tcd structure
*/
-/*void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t *img);*/ /* TODO MSD shoul use the new v2 structures */
+/*void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t *img);*/ /* TODO MSD should use the new v2 structures */
/**
Create a new TCD handle
/**
Create a new TCD handle
OPJ_SIZE_T opj_tcd_get_encoder_input_buffer_size(opj_tcd_t *p_tcd);
/**
OPJ_SIZE_T opj_tcd_get_encoder_input_buffer_size(opj_tcd_t *p_tcd);
/**
- * Initialize the tile coder and may reuse some meory.
+ * Initialize the tile coder and may reuse some memory.
*
* @param p_tcd TCD handle.
* @param p_tile_no current tile index to encode.
*
* @param p_tcd TCD handle.
* @param p_tile_no current tile index to encode.
* @param y0 Upper left y in subband coordinates
* @param x1 Lower right x in subband coordinates
* @param y1 Lower right y in subband coordinates
* @param y0 Upper left y in subband coordinates
* @param x1 Lower right x in subband coordinates
* @param y1 Lower right y in subband coordinates
- * @return OPJ_TRUE whether the sub-band region contributs to the area of
+ * @return OPJ_TRUE whether the sub-band region contributes to the area of
* interest.
*/
OPJ_BOOL opj_tcd_is_subband_area_of_interest(opj_tcd_t *tcd,
* interest.
*/
OPJ_BOOL opj_tcd_is_subband_area_of_interest(opj_tcd_t *tcd,
typedef struct auxtrans_param {
int tcpauxport; /**< tcp port*/
int udpauxport; /**< udp port*/
typedef struct auxtrans_param {
int tcpauxport; /**< tcp port*/
int udpauxport; /**< udp port*/
- SOCKET tcplistensock; /**< listenning socket for aux tcp (-1 if not open)*/
- SOCKET udplistensock; /**< listenning socket for aux udp (-1 if not open)*/
+ SOCKET tcplistensock; /**< listening socket for aux tcp (-1 if not open)*/
+ SOCKET udplistensock; /**< listening socket for aux udp (-1 if not open)*/
/**
* generate box from JP2 file at the given offset
*
/**
* generate box from JP2 file at the given offset
*
- * @param[in] fd file discriptor of the JP2 file
+ * @param[in] fd file descriptor of the JP2 file
* @param[in] offset Box offset
* @return pointer to the structure of generate box parameters
*/
* @param[in] offset Box offset
* @return pointer to the structure of generate box parameters
*/
/**
* generate(search) box from JP2 file
*
/**
* generate(search) box from JP2 file
*
- * @param[in] fd file discriptor of the JP2 file
+ * @param[in] fd file descriptor of the JP2 file
* @param[in] offset start Byte position of the search
* @param[in] length Byte length of the search, if 0, size to the end of file
* @param[in] TBox Box Type
* @param[in] offset start Byte position of the search
* @param[in] length Byte length of the search, if 0, size to the end of file
* @param[in] TBox Box Type
/**
* generate a box header at the given offset
*
/**
* generate a box header at the given offset
*
- * @param[in] fd file discriptor of the JP2 file
+ * @param[in] fd file descriptor of the JP2 file
* @param[in] offset Box offset
* @return pointer to the structure of generate box header parameters
*/
* @param[in] offset Box offset
* @return pointer to the structure of generate box header parameters
*/
/**
* fetch bytes of data in file stream
*
/**
* fetch bytes of data in file stream
*
- * @param[in] fd file discriptor
+ * @param[in] fd file descriptor
* @param[in] offset start Byte position
* @param[in] size Byte length
* @return pointer to the fetched data
* @param[in] offset start Byte position
* @param[in] size Byte length
* @return pointer to the fetched data
/**
* fetch a 1-byte Byte codes in file stream
*
/**
* fetch a 1-byte Byte codes in file stream
*
- * @param[in] fd file discriptor
+ * @param[in] fd file descriptor
* @param[in] offset start Byte position
* @return fetched codes
*/
* @param[in] offset start Byte position
* @return fetched codes
*/
/**
* fetch a 2-byte big endian Byte codes in file stream
*
/**
* fetch a 2-byte big endian Byte codes in file stream
*
- * @param[in] fd file discriptor
+ * @param[in] fd file descriptor
* @param[in] offset start Byte position
* @return fetched codes
*/
* @param[in] offset start Byte position
* @return fetched codes
*/
/**
* fetch a 4-byte big endian Byte codes in file stream
*
/**
* fetch a 4-byte big endian Byte codes in file stream
*
- * @param[in] fd file discriptor
+ * @param[in] fd file descriptor
* @param[in] offset start Byte position
* @return fetched codes
*/
* @param[in] offset start Byte position
* @return fetched codes
*/
/**
* fetch a 8-byte big endian Byte codes in file stream
*
/**
* fetch a 8-byte big endian Byte codes in file stream
*
- * @param[in] fd file discriptor
+ * @param[in] fd file descriptor
* @param[in] offset start Byte position
* @return fetched codes
*/
* @param[in] offset start Byte position
* @return fetched codes
*/
- * @param[in] fd file discriptor
+ * @param[in] fd file descriptor
* @return file size
*/
OPJ_OFF_T get_filesize(int fd);
* @return file size
*/
OPJ_OFF_T get_filesize(int fd);
* reconstruct JPT/JPP-stream from message queue
*
* @param[in] msgqueue message queue pointer
* reconstruct JPT/JPP-stream from message queue
*
* @param[in] msgqueue message queue pointer
- * @param[in] tmpfd file discriptor to write JPT/JPP-stream
+ * @param[in] tmpfd file descriptor to write JPT/JPP-stream
*/
void recons_stream_from_msgqueue(msgqueue_param_t *msgqueue, int tmpfd);
*/
void recons_stream_from_msgqueue(msgqueue_param_t *msgqueue, int tmpfd);
Byte_t *jpipstream; /**< JPT/JPP stream*/
OPJ_SIZE_T jpipstreamlen; /**< length of jpipstream*/
msgqueue_param_t *msgqueue; /**< parsed message queue of jpipstream*/
Byte_t *jpipstream; /**< JPT/JPP stream*/
OPJ_SIZE_T jpipstreamlen; /**< length of jpipstream*/
msgqueue_param_t *msgqueue; /**< parsed message queue of jpipstream*/
- SOCKET listening_socket; /**< listenning socket*/
+ SOCKET listening_socket; /**< listening socket*/
- * generate a session under the sesion list
+ * generate a session under the session list
*
* @param[in] sessionlist session list to insert the new session
* @return pointer to the generated session
*
* @param[in] sessionlist session list to insert the new session
* @return pointer to the generated session
SOCKET open_listeningsocket(uint16_t port);
/**
SOCKET open_listeningsocket(uint16_t port);
/**
- * accept a new connection to the listenning socket
+ * accept a new connection to the listening socket
- * @param listening_socket listenning socket
+ * @param listening_socket listening socket
* @return connected socket (-1 if error occurs)
*/
SOCKET accept_socket(SOCKET listening_socket);
* @return connected socket (-1 if error occurs)
*/
SOCKET accept_socket(SOCKET listening_socket);
if ( imageToPNG(imageDiff, filenamePNGdiff_it_comp, it_comp) == EXIT_SUCCESS )
{
if ( imageToPNG(imageDiff, filenamePNGdiff_it_comp, it_comp) == EXIT_SUCCESS )
{
- printf("<DartMeasurementFile name=\"DiffferenceImage_%d\" type=\"image/png\"> %s </DartMeasurementFile> \n", it_comp, filenamePNGdiff_it_comp);
+ printf("<DartMeasurementFile name=\"DifferenceImage_%d\" type=\"image/png\"> %s </DartMeasurementFile> \n", it_comp, filenamePNGdiff_it_comp);
issue475.jp2 #kdu_jp2info ok
issue413.jp2 #kdu_jp2info ok
issue823.jp2 #kdu_jp2info ok
issue475.jp2 #kdu_jp2info ok
issue413.jp2 #kdu_jp2info ok
issue823.jp2 #kdu_jp2info ok
- issue826.jp2 #inspection reveales that the transformation value is out of range
- oss-fuzz2785.jp2 #inspection reveales that the transformation value is out of range
+ issue826.jp2 #inspection reveals that the transformation value is out of range
+ oss-fuzz2785.jp2 #inspection reveals that the transformation value is out of range
# + 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
# ref decoder.
# + 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
# ref decoder.
-# + For decoder related tests = dump, compare dump to base, (TODO: compare outpout decoding
+# + For decoder related tests = dump, compare dump to base, (TODO: compare output decoding
# image to base)
#
# Line begin with ! should failed (should be used for bad jpeg2000 file which should be
# image to base)
#
# Line begin with ! should failed (should be used for bad jpeg2000 file which should be
{
#define NUMJP2 32
int i, c = 0;
{
#define NUMJP2 32
int i, c = 0;
char buffer[512];
#define BUFLEN 4096
int cont = 1;
char buffer[512];
#define BUFLEN 4096
int cont = 1;
const ptrdiff_t diff = ret - haystack;
assert( diff >= 0 );
/*fprintf( stdout, "Found it: %lx\n", (ptrdiff_t)cpos - (ptrdiff_t)hlen + diff);*/
const ptrdiff_t diff = ret - haystack;
assert( diff >= 0 );
/*fprintf( stdout, "Found it: %lx\n", (ptrdiff_t)cpos - (ptrdiff_t)hlen + diff);*/
- offets[c++] = (ptrdiff_t)cpos - (ptrdiff_t)hlen + diff;
+ offsets[c++] = (ptrdiff_t)cpos - (ptrdiff_t)hlen + diff;
}
cont = (nread == flen);
memcpy( haystack, haystack + nread, nlen );
}
cont = (nread == flen);
memcpy( haystack, haystack + nread, nlen );
{
int s, len = 0;
char *r;
{
int s, len = 0;
char *r;
- const int ret = fseek(f, offets[i], SEEK_SET);
+ const int ret = fseek(f, offsets[i], SEEK_SET);
assert( ret == 0 );
r = fgets(buffer, sizeof(buffer), f);
assert( r );
assert( ret == 0 );
r = fgets(buffer, sizeof(buffer), f);
assert( r );
s = sscanf(r, "JPXDecode]/Length %d/Width %*d/BitsPerComponent %*d/Height %*d", &len);
if( s == 0 )
{ // try again harder
s = sscanf(r, "JPXDecode]/Length %d/Width %*d/BitsPerComponent %*d/Height %*d", &len);
if( s == 0 )
{ // try again harder
- const int ret = fseek(f, offets[i] - 40, SEEK_SET); // 40 is magic number
+ const int ret = fseek(f, offsets[i] - 40, SEEK_SET); // 40 is magic number
assert( ret == 0 );
r = fgets(buffer, sizeof(buffer), f);
assert( r );
assert( ret == 0 );
r = fgets(buffer, sizeof(buffer), f);
assert( r );
/* ----------------------------------------------------- */
/* ----------------------------------------------------- */
- case 'r': { /* rates rates/distorsion */
+ case 'r': { /* rates rates/distortion */
char *s = opj_optarg;
while (sscanf(s, "%f", ¶meters->tcp_rates[parameters->tcp_numlayers]) ==
1) {
char *s = opj_optarg;
while (sscanf(s, "%f", ¶meters->tcp_rates[parameters->tcp_numlayers]) ==
1) {
+ (10 /* image_w until decomposition */
+ (cstr_info->numdecompos[0] + 1) * 2 /* pdx size for each tile */
+ 2 /* main_head_end + codestream_size */
+ (10 /* image_w until decomposition */
+ (cstr_info->numdecompos[0] + 1) * 2 /* pdx size for each tile */
+ 2 /* main_head_end + codestream_size */
- + cstr_info->tw * cstr_info->th * 4 /* tile info, without distorsion info */
+ + cstr_info->tw * cstr_info->th * 4 /* tile info, without distortion info */
+ cstr_info->tw * cstr_info->th * cstr_info->numlayers *
(cstr_info->numdecompos[0] + 1) * cstr_info->numcomps * prec_max * 8
) * sizeof(int);
+ cstr_info->tw * cstr_info->th * cstr_info->numlayers *
(cstr_info->numdecompos[0] + 1) * cstr_info->numcomps * prec_max * 8
) * sizeof(int);