diff options
| author | mayeut <mayeut@users.noreply.github.com> | 2015-10-06 20:55:36 +0200 |
|---|---|---|
| committer | mayeut <mayeut@users.noreply.github.com> | 2015-10-06 20:55:36 +0200 |
| commit | 2dab5fed591d19a3295b42225701801ee52569fb (patch) | |
| tree | e70b732926ca0ac38b5cdc8e0d1cd0c49da7833d /src/lib | |
| parent | 4bb5e24d234dbf239119524edae4e23f39de7ee4 (diff) | |
| parent | e526d435cc874b97ae41eacc6b8b0b72419180fb (diff) | |
Merge branch 'master' into coc-qcc
Diffstat (limited to 'src/lib')
31 files changed, 89 insertions, 77 deletions
diff --git a/src/lib/openjp2/cio.h b/src/lib/openjp2/cio.h index 6dfa5bb8..1b684ef8 100644 --- a/src/lib/openjp2/cio.h +++ b/src/lib/openjp2/cio.h @@ -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_value pointer to the value that will store the data. * @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); @@ -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_value the value 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); @@ -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_value pointer to the value that will store the data. * @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); @@ -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_size number of bytes to read. * @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); @@ -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_size number of bytes to write. * @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); @@ -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_size the number of bytes to skip. * @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); @@ -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_size the number of bytes to skip. * @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); @@ -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_size the number of bytes to skip. * @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); @@ -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_size the number of bytes to skip. * @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); @@ -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_size the number of bytes to skip. * @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); diff --git a/src/lib/openjp2/dwt.h b/src/lib/openjp2/dwt.h index f8b57bc0..21fe942a 100644 --- a/src/lib/openjp2/dwt.h +++ b/src/lib/openjp2/dwt.h @@ -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. @param tilec Tile component information (current tile) */ 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. @param tilec Tile component information (current tile) @param numres Number of resolution levels to decode diff --git a/src/lib/openjp2/indexbox_manager.h b/src/lib/openjp2/indexbox_manager.h index ec5525f5..ebcde8fe 100644 --- a/src/lib/openjp2/indexbox_manager.h +++ b/src/lib/openjp2/indexbox_manager.h @@ -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 ); /* - * Wriet manifest box (box) + * Write manifest box (box) * * @param[in] second number to be visited * @param[in] v number of boxes diff --git a/src/lib/openjp2/invert.c b/src/lib/openjp2/invert.c index dd4998a9..7efaf6ec 100644 --- a/src/lib/openjp2/invert.c +++ b/src/lib/openjp2/invert.c @@ -125,7 +125,7 @@ static OPJ_BOOL opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations, { *tmpPermutations++ = i; } - /* now make a pivot with colum switch */ + /* now make a pivot with column switch */ tmpPermutations = permutations; for (k = 0; k < lLastColum; ++k) { p = 0.0; diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index 128a62e0..155b1eb8 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -3615,7 +3615,7 @@ static OPJ_BOOL opj_j2k_read_ppm ( return OPJ_FALSE; } - l_cp->ppm_markers[l_Z_ppm].m_data = opj_malloc(p_header_size); + l_cp->ppm_markers[l_Z_ppm].m_data = (OPJ_BYTE *) opj_malloc(p_header_size); if (l_cp->ppm_markers[l_Z_ppm].m_data == NULL) { /* clean up to be done on l_cp destruction */ opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read PPM marker\n"); @@ -3837,7 +3837,7 @@ static OPJ_BOOL opj_j2k_read_ppt ( opj_j2k_t *p_j2k, return OPJ_FALSE; } - l_tcp->ppt_markers[l_Z_ppt].m_data = opj_malloc(p_header_size); + l_tcp->ppt_markers[l_Z_ppt].m_data = (OPJ_BYTE *) opj_malloc(p_header_size); if (l_tcp->ppt_markers[l_Z_ppt].m_data == NULL) { /* clean up to be done on l_tcp destruction */ opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to read PPT marker\n"); @@ -4404,7 +4404,7 @@ static OPJ_BOOL opj_j2k_read_sod (opj_j2k_t *p_j2k, } if (! *l_current_data) { /* 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); } @@ -5638,7 +5638,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 */ 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_mcc_record = l_tcp->m_mcc_records; @@ -5690,7 +5690,7 @@ static OPJ_BOOL opj_j2k_read_mco ( opj_j2k_t *p_j2k, 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; if (l_nb_stages > 1) { @@ -7737,6 +7737,11 @@ static OPJ_BOOL opj_j2k_need_nb_tile_parts_correction(opj_stream_private_t *p_st /* initialize to no correction needed */ *p_correction_needed = OPJ_FALSE; + if (!opj_stream_has_seek(p_stream)) { + /* We can't do much in this case, seek is needed */ + return OPJ_TRUE; + } + l_stream_pos_backup = opj_stream_tell(p_stream); if (l_stream_pos_backup == -1) { /* let's do nothing */ @@ -8658,8 +8663,10 @@ static opj_codestream_index_t* opj_j2k_create_cstr_index(void) cstr_index->marknum = 0; cstr_index->marker = (opj_marker_info_t*) opj_calloc(cstr_index->maxmarknum, sizeof(opj_marker_info_t)); - if (!cstr_index-> marker) + if (!cstr_index-> marker) { + opj_free(cstr_index); return NULL; + } cstr_index->tile_index = NULL; @@ -9817,14 +9824,14 @@ static OPJ_BOOL opj_j2k_decode_one_tile ( opj_j2k_t *p_j2k, * so move to the last SOT read */ if ( !(opj_stream_read_seek(p_stream, p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos+2, p_manager)) ){ opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n"); - opj_free(l_current_data); + opj_free(l_current_data); return OPJ_FALSE; } } else{ if ( !(opj_stream_read_seek(p_stream, p_j2k->cstr_index->tile_index[l_tile_no_to_dec].tp_index[0].start_pos+2, p_manager)) ) { opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n"); - opj_free(l_current_data); + opj_free(l_current_data); return OPJ_FALSE; } } @@ -9882,6 +9889,7 @@ static OPJ_BOOL opj_j2k_decode_one_tile ( opj_j2k_t *p_j2k, /* move into the codestream to the the first SOT (FIXME or not move?)*/ if (!(opj_stream_read_seek(p_stream, p_j2k->cstr_index->main_head_end + 2, p_manager) ) ) { opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n"); + opj_free(l_current_data); return OPJ_FALSE; } break; @@ -10147,11 +10155,15 @@ OPJ_BOOL opj_j2k_encode(opj_j2k_t * p_j2k, /* now copy this data into the tile component */ if (! opj_tcd_copy_tile_data(p_j2k->m_tcd,l_current_data,l_current_tile_size)) { opj_event_msg(p_manager, EVT_ERROR, "Size mismatch between tile data and sent data." ); + opj_free(l_current_data); return OPJ_FALSE; } } if (! opj_j2k_post_write_tile (p_j2k,p_stream,p_manager)) { + if (l_current_data) { + opj_free(l_current_data); + } return OPJ_FALSE; } } diff --git a/src/lib/openjp2/jp2.c b/src/lib/openjp2/jp2.c index af692d59..c14e9a06 100644 --- a/src/lib/openjp2/jp2.c +++ b/src/lib/openjp2/jp2.c @@ -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_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, 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_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, 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_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, OPJ_BYTE * p_data, @@ -889,7 +889,7 @@ static OPJ_BOOL opj_jp2_check_color(opj_image_t *image, opj_jp2_color_t *color, } } - pcol_usage = opj_calloc(nr_channels, sizeof(OPJ_BOOL)); + pcol_usage = (OPJ_BOOL *) opj_calloc(nr_channels, sizeof(OPJ_BOOL)); if (!pcol_usage) { opj_event_msg(p_manager, EVT_ERROR, "Unexpected OOM.\n"); return OPJ_FALSE; @@ -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_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, OPJ_BYTE *p_header_data, diff --git a/src/lib/openjp2/jp2.h b/src/lib/openjp2/jp2.h index 914c47f9..94138832 100644 --- a/src/lib/openjp2/jp2.h +++ b/src/lib/openjp2/jp2.h @@ -90,7 +90,7 @@ typedef enum JP2_IMG_STATE; /** -Channel description: channel index, type, assocation +Channel description: channel index, type, association */ typedef struct opj_jp2_cdef_info { diff --git a/src/lib/openjp2/mct.c b/src/lib/openjp2/mct.c index a0da0996..8b0276f3 100644 --- a/src/lib/openjp2/mct.c +++ b/src/lib/openjp2/mct.c @@ -70,7 +70,7 @@ const OPJ_FLOAT64 * opj_mct_get_mct_norms_real () } /* <summary> */ -/* Foward reversible MCT. */ +/* Forward reversible MCT. */ /* </summary> */ #ifdef __SSE2__ void opj_mct_encode( @@ -202,7 +202,7 @@ OPJ_FLOAT64 opj_mct_getnorm(OPJ_UINT32 compno) { } /* <summary> */ -/* Foward irreversible MCT. */ +/* Forward irreversible MCT. */ /* </summary> */ #ifdef __SSE4_1__ void opj_mct_encode_real( diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index 4a8e75ce..c07e9c84 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -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 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 -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. */ # if defined(OPJ_EXPORTS) || defined(DLL_EXPORT) @@ -850,7 +850,7 @@ typedef struct opj_codestream_info { } 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 @@ -1347,7 +1347,7 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec, 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. * * @param p_codec the jpeg2000 codec. diff --git a/src/lib/openjp2/opj_malloc.h b/src/lib/openjp2/opj_malloc.h index 5007b0c9..517707f9 100644 --- a/src/lib/openjp2/opj_malloc.h +++ b/src/lib/openjp2/opj_malloc.h @@ -79,7 +79,7 @@ void * OPJ_CALLCONV opj_calloc(size_t _NumOfElements, size_t _SizeOfElements); #endif /** -Allocate memory aligned to a 16 byte boundry +Allocate memory aligned to a 16 byte boundary @param size Bytes to allocate @return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available */ diff --git a/src/lib/openjp2/pi.h b/src/lib/openjp2/pi.h index f239679f..265d5b1e 100644 --- a/src/lib/openjp2/pi.h +++ b/src/lib/openjp2/pi.h @@ -73,7 +73,7 @@ Packet iterator typedef struct opj_pi_iterator { /** Enabling Tile part generation*/ 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; /** layer step used to localize the packet in the include vector */ OPJ_UINT32 step_l; diff --git a/src/lib/openjp2/tcd.h b/src/lib/openjp2/tcd.h index bb9a6205..07f8379a 100644 --- a/src/lib/openjp2/tcd.h +++ b/src/lib/openjp2/tcd.h @@ -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_len Maximum length of the destination buffer * @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_UINT32 p_tile_no, diff --git a/src/lib/openjp3d/cio.h b/src/lib/openjp3d/cio.h index 3617dad7..3cfa6fcb 100644 --- a/src/lib/openjp3d/cio.h +++ b/src/lib/openjp3d/cio.h @@ -65,7 +65,7 @@ Write some bytes @param cio CIO handle @param v Value 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); /** @@ -86,7 +86,7 @@ Write some bytes @param cio CIO handle @param v Signed integer value 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); /** diff --git a/src/lib/openjp3d/dwt.c b/src/lib/openjp3d/dwt.c index 1558cc3f..a1e4e104 100644 --- a/src/lib/openjp3d/dwt.c +++ b/src/lib/openjp3d/dwt.c @@ -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); /** -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_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_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> */ -/* Forward 5-3 or 9-7 wavelet tranform in 1-D. */ +/* Forward 5-3 or 9-7 wavelet transform in 1-D. */ /* </summary> */ static void dwt_encode_53(int *a, int dn, int sn, int cas) { int i; @@ -409,7 +409,7 @@ static void dwt_encode_97(int *a, int dn, int sn, int cas) { } } /* <summary> */ -/* Inverse 5-3 or 9-7 wavelet tranform in 1-D. */ +/* Inverse 5-3 or 9-7 wavelet transform in 1-D. */ /* </summary> */ static void dwt_decode_53(int *a, int dn, int sn, int cas) { int i; @@ -661,7 +661,7 @@ static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno ========================================================== */ /* <summary> */ -/* Forward 5-3 wavelet tranform in 3-D. */ +/* Forward 5-3 wavelet transform in 3-D. */ /* </summary> */ void dwt_encode(opj_tcd_tilecomp_t * tilec, int dwtid[3]) { int i, j, k; @@ -792,7 +792,7 @@ void dwt_encode(opj_tcd_tilecomp_t * tilec, int dwtid[3]) { /* <summary> */ -/* Inverse 5-3 wavelet tranform in 3-D. */ +/* Inverse 5-3 wavelet transform in 3-D. */ /* </summary> */ void dwt_decode(opj_tcd_tilecomp_t * tilec, int stops[3], int dwtid[3]) { int i, j, k; diff --git a/src/lib/openjp3d/dwt.h b/src/lib/openjp3d/dwt.h index 5c3f6847..00082900 100644 --- a/src/lib/openjp3d/dwt.h +++ b/src/lib/openjp3d/dwt.h @@ -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. @param tilec Tile component information (current tile) @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]); /** -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. @param tilec Tile component information (current tile) @param stops Number of decoded resolution levels in each dimension diff --git a/src/lib/openjp3d/mct.c b/src/lib/openjp3d/mct.c index 5759047b..685a9f88 100644 --- a/src/lib/openjp3d/mct.c +++ b/src/lib/openjp3d/mct.c @@ -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 }; /* <summary> */ -/* Foward reversible MCT. */ +/* Forward reversible MCT. */ /* </summary> */ void mct_encode(int *c0, int *c1, int *c2, int n) { int i; @@ -91,7 +91,7 @@ double mct_getnorm(int compno) { } /* <summary> */ -/* Foward irreversible MCT. */ +/* Forward irreversible MCT. */ /* </summary> */ void mct_encode_real(int *c0, int *c1, int *c2, int n) { int i; diff --git a/src/lib/openjp3d/openjp3d.h b/src/lib/openjp3d/openjp3d.h index ae2507c0..a720bd37 100644 --- a/src/lib/openjp3d/openjp3d.h +++ b/src/lib/openjp3d/openjp3d.h @@ -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 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 -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. */ #if defined(OPJ_EXPORTS) || defined(DLL_EXPORT) diff --git a/src/lib/openjp3d/pi.h b/src/lib/openjp3d/pi.h index b3f287a3..c81f9ef0 100644 --- a/src/lib/openjp3d/pi.h +++ b/src/lib/openjp3d/pi.h @@ -82,7 +82,7 @@ typedef struct opj_pi_comp { Packet 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; /** layer step used to localize the packet in the include vector */ int step_l; diff --git a/src/lib/openjpip/cachemodel_manager.h b/src/lib/openjpip/cachemodel_manager.h index ac54026d..041f1ad9 100644 --- a/src/lib/openjpip/cachemodel_manager.h +++ b/src/lib/openjpip/cachemodel_manager.h @@ -80,7 +80,7 @@ void print_cachemodel( cachemodel_param_t cachemodel); /** * search a cache model of a target * - * @param[in] target refering target + * @param[in] target referring target * @param[in] cachemodellist cache model list * @return found cache model pointer */ diff --git a/src/lib/openjpip/imgsock_manager.c b/src/lib/openjpip/imgsock_manager.c index 10e997b1..4337e608 100644 --- a/src/lib/openjpip/imgsock_manager.c +++ b/src/lib/openjpip/imgsock_manager.c @@ -181,19 +181,19 @@ void send_PNMstream( SOCKET connected_socket, Byte_t *pnmstream, unsigned int wi void send_SIZstream( SOCKET connected_socket, unsigned int width, unsigned int height) { - Byte_t responce[9]; + Byte_t response[9]; - responce[0] = 'S'; - responce[1] = 'I'; - responce[2] = 'Z'; - responce[3] = (width >> 16) & 0xff; - responce[4] = (width >> 8) & 0xff; - responce[5] = width & 0xff; - responce[6] = (height >> 16) & 0xff; - responce[7] = (height >> 8) & 0xff; - responce[8] = height & 0xff; - - send_stream( connected_socket, responce, 9); + response[0] = 'S'; + response[1] = 'I'; + response[2] = 'Z'; + response[3] = (width >> 16) & 0xff; + response[4] = (width >> 8) & 0xff; + response[5] = width & 0xff; + response[6] = (height >> 16) & 0xff; + response[7] = (height >> 8) & 0xff; + response[8] = height & 0xff; + + send_stream( connected_socket, response, 9); } void response_signal( SOCKET connected_socket, OPJ_BOOL succeed) diff --git a/src/lib/openjpip/jpip_parser.c b/src/lib/openjpip/jpip_parser.c index c206662d..d44c84c8 100644 --- a/src/lib/openjpip/jpip_parser.c +++ b/src/lib/openjpip/jpip_parser.c @@ -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; 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) return; /* MM: I think the API should not really be int should it ? */ diff --git a/src/lib/openjpip/target_manager.h b/src/lib/openjpip/target_manager.h index 4ed99a79..561510f5 100644 --- a/src/lib/openjpip/target_manager.h +++ b/src/lib/openjpip/target_manager.h @@ -46,7 +46,7 @@ typedef struct target_param{ #endif int csn; /**< codestream number */ 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 jptstream; /**< if this target can return JPP-stream */ struct target_param *next; /**< pointer to the next target */ diff --git a/src/lib/openjpwl/jpwl.h b/src/lib/openjpwl/jpwl.h index 748a6b38..ca0ee0a1 100644 --- a/src/lib/openjpwl/jpwl.h +++ b/src/lib/openjpwl/jpwl.h @@ -357,7 +357,7 @@ opj_bool jpwl_correct(opj_j2k_t *j2k); @param post_len length of post_data @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 -@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, unsigned char **L4_bufp); diff --git a/src/lib/openjpwl/rs.c b/src/lib/openjpwl/rs.c index e35781f6..a0bd7c71 100644 --- a/src/lib/openjpwl/rs.c +++ b/src/lib/openjpwl/rs.c @@ -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 example the polynomial representation of @^5 would be given by the binary 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 the root of the primitive polynomial p(x). In order to find the power of @ (alpha) that has the polynomial representation @@ -237,7 +237,7 @@ void init_rs(int k) NOTE: The element alpha_to[2^m-1] = 0 always signifying that the 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 (0,0,...,0) is "infinity". diff --git a/src/lib/openmj2/cio.h b/src/lib/openmj2/cio.h index f389d4e2..3cae708e 100644 --- a/src/lib/openmj2/cio.h +++ b/src/lib/openmj2/cio.h @@ -74,7 +74,7 @@ Write some bytes @param cio CIO handle @param v Value 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); /** diff --git a/src/lib/openmj2/dwt.h b/src/lib/openmj2/dwt.h index 3cb3b209..5b9645bf 100644 --- a/src/lib/openmj2/dwt.h +++ b/src/lib/openmj2/dwt.h @@ -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. @param tilec Tile component information (current tile) */ 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. @param tilec Tile component information (current tile) @param numres Number of resolution levels to decode diff --git a/src/lib/openmj2/jp2.h b/src/lib/openmj2/jp2.h index f1b9c0d3..fbd17a4d 100644 --- a/src/lib/openmj2/jp2.h +++ b/src/lib/openmj2/jp2.h @@ -58,7 +58,7 @@ /* ----------------------------------------------------------------------- */ /** -Channel description: channel index, type, assocation +Channel description: channel index, type, association */ typedef struct opj_jp2_cdef_info { diff --git a/src/lib/openmj2/mct.c b/src/lib/openmj2/mct.c index e507a781..0f926194 100644 --- a/src/lib/openmj2/mct.c +++ b/src/lib/openmj2/mct.c @@ -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 }; /* <summary> */ -/* Foward reversible MCT. */ +/* Forward reversible MCT. */ /* </summary> */ void mct_encode( int* restrict c0, @@ -105,7 +105,7 @@ double mct_getnorm(int compno) { } /* <summary> */ -/* Foward irreversible MCT. */ +/* Forward irreversible MCT. */ /* </summary> */ void mct_encode_real( int* restrict c0, diff --git a/src/lib/openmj2/openjpeg.h b/src/lib/openmj2/openjpeg.h index f765fc2c..132ec2fd 100644 --- a/src/lib/openmj2/openjpeg.h +++ b/src/lib/openmj2/openjpeg.h @@ -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 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 -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. */ #if defined(OPJ_EXPORTS) || defined(DLL_EXPORT) diff --git a/src/lib/openmj2/opj_malloc.h b/src/lib/openmj2/opj_malloc.h index 9e4af234..1b62ab02 100644 --- a/src/lib/openmj2/opj_malloc.h +++ b/src/lib/openmj2/opj_malloc.h @@ -64,7 +64,7 @@ void * OPJ_CALLCONV opj_calloc(size_t _NumOfElements, size_t _SizeOfElements); #endif
/**
-Allocate memory aligned to a 16 byte boundry
+Allocate memory aligned to a 16 byte boundary
@param size Bytes to allocate
@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available
*/
diff --git a/src/lib/openmj2/pi.h b/src/lib/openmj2/pi.h index fa0d08ab..7f2fe3ef 100644 --- a/src/lib/openmj2/pi.h +++ b/src/lib/openmj2/pi.h @@ -73,7 +73,7 @@ Packet iterator typedef struct opj_pi_iterator { /** Enabling Tile part generation*/ 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; /** layer step used to localize the packet in the include vector */ int step_l; |
