Fix some typos (found by `codespell` and `typos`) 1517/head
authorStefan Weil <sw@weilnetz.de>
Wed, 28 Feb 2024 14:28:51 +0000 (15:28 +0100)
committerStefan Weil <sw@weilnetz.de>
Wed, 28 Feb 2024 15:23:43 +0000 (16:23 +0100)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
24 files changed:
doc/man/man3/libopenjp2.3
src/bin/jp2/convertbmp.c
src/bin/jp2/opj_compress.c
src/bin/wx/OPJViewer/source/imagjpeg2000.cpp
src/bin/wx/OPJViewer/source/wxj2kparser.cpp
src/lib/openjp2/ht_dec.c
src/lib/openjp2/openjpeg.h
src/lib/openjp2/opj_common.h
src/lib/openjp2/t1.c
src/lib/openjp2/tcd.c
src/lib/openjp2/tcd.h
src/lib/openjpip/auxtrans_manager.h
src/lib/openjpip/box_manager.h
src/lib/openjpip/boxheader_manager.h
src/lib/openjpip/byte_manager.h
src/lib/openjpip/msgqueue_manager.h
src/lib/openjpip/openjpip.h
src/lib/openjpip/session_manager.h
src/lib/openjpip/sock_manager.h
tests/compare_images.c
tests/nonregression/CMakeLists.txt
tests/nonregression/test_suite.ctest.in
tests/pdf2jp2.c
wrapping/java/openjp2/JavaOpenJPEG.c

index 9b06cc867894937a2f24457d16e841733a357246..f504621da0a221400237a21ad2f3c27e5c2e795d 100644 (file)
@@ -245,10 +245,10 @@ typedef struct opj_cparameters
     \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;
-    /* 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 */
index eb4d420cfcbbcdef5e8995134bf13acc4b59937b..3ef9915fe1a33b0c7a5962c4e31655be8d68d24f 100644 (file)
@@ -604,7 +604,7 @@ static OPJ_BOOL bmp_read_rle8_data(FILE* IN, OPJ_UINT8* pData,
     }/* 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");
         return OPJ_FALSE;
     }
 
@@ -693,7 +693,7 @@ static OPJ_BOOL bmp_read_rle4_data(FILE* IN, OPJ_UINT8* pData,
         }
     }  /* 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;
index 212f144e7a8c052eccddde6682cea813f4c38073..c3d7f4fba403cc7e3e98106cd41d9e4eb78f5ef4 100644 (file)
@@ -728,7 +728,7 @@ static int parse_cmdline_encoder(int argc, char **argv,
         /* ----------------------------------------------------- */
 
 
-        case 'r': {         /* rates rates/distorsion */
+        case 'r': {         /* rates rates/distortion */
             char *s = opj_optarg;
             parameters->tcp_numlayers = 0;
             while (sscanf(s, "%f", &parameters->tcp_rates[parameters->tcp_numlayers]) ==
index 9e1ab90dce23fe85c0f880a63a984d0380fb22a8..4eda46adb8d90214f969a09f452006f7c6d9a1ab 100644 (file)
@@ -652,7 +652,7 @@ jpeg2000_file_parse(wxInputStream& stream, unsigned long int filepoint,
     return (0);
 }
 
-// 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)
 {
index 7c85d873e9ff020d667c8ea5daedf75802148830..1ff7d6b447954fc69c53645ce426ca5a3b5dcca3 100644 (file)
@@ -845,7 +845,7 @@ void OPJParseThread::ParseJ2KFile(wxFile *m_file, wxFileOffset offset, wxFileOff
                                );
 
                        if (cbstyle & 0x04)
-                               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,
@@ -1064,7 +1064,7 @@ void OPJParseThread::ParseJ2KFile(wxFile *m_file, wxFileOffset offset, wxFileOff
                                );
 
                        if (cbstyle & 0x04)
-                               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,
index a554b24a6a2ce45d5ebc1fd0afd7ca131d1881db..2984f56098b990d98124d8b3df7b87184a67d571 100644 (file)
@@ -901,7 +901,7 @@ typedef struct frwd_struct {
   *  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.
@@ -1032,7 +1032,7 @@ OPJ_UINT32 frwd_fetch(frwd_struct_t *msp)
 //************************************************************************/
 /** @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
   */
@@ -1120,7 +1120,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
 /** @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
index 67d168bb57857fbc2a26361fd03896ac979343c7..113481bbb7334d509282d6a5bac281e43192d8d3 100644 (file)
@@ -772,7 +772,7 @@ typedef struct opj_packet_info {
     OPJ_OFF_T end_ph_pos;
     /** packet end position */
     OPJ_OFF_T end_pos;
-    /** packet distorsion */
+    /** packet distortion */
     double disto;
 } opj_packet_info_t;
 
index ee8adf4725c4bcaf9e1b8489abdc33c2b04b1264..2923a35b7fee41d3a218873ff1667e055ac82a9d 100644 (file)
@@ -28,8 +28,8 @@
  * 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
 
 /*
  ==========================================================
@@ -44,4 +44,4 @@
 #define OPJ_COMP_PARAM_DEFAULT_PROG_ORDER     OPJ_LRCP
 #define OPJ_COMP_PARAM_DEFAULT_NUMRESOLUTION  6
 
-#endif /* OPJ_COMMMON_H */
+#endif /* OPJ_COMMON_H */
index 52e466eb974afd1fc89f0ed180b95973ee8bc532..df14ffc1285c9a8c9c952e024c714bdb83e66d78 100644 (file)
@@ -2124,7 +2124,7 @@ static OPJ_BOOL opj_t1_decode_cblk(opj_t1_t *t1,
                 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);
index 687aa61bb094fb302f1099183e11bc35d3b58879..8ca259b71dc31eea18f33e0c00e31ae4a3600c19 100644 (file)
@@ -243,7 +243,7 @@ void opj_tcd_rateallocate_fixed(opj_tcd_t *tcd)
 /* ----------------------------------------------------------------------- */
 
 /** 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,
@@ -2861,12 +2861,12 @@ OPJ_BOOL opj_tcd_is_subband_area_of_interest(opj_tcd_t *tcd,
     return intersects;
 }
 
-/** 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
- * @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)
index f659869a13447a8c868d5502ae65e91555719c73..cf4e0082b52124b7950fb6910c76057c1d66965b 100644 (file)
@@ -312,7 +312,7 @@ typedef struct opj_tcd_marker_info {
 /**
 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
@@ -443,7 +443,7 @@ OPJ_BOOL opj_tcd_update_tile_data(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.
@@ -491,7 +491,7 @@ void opj_tcd_reinit_segment(opj_tcd_seg_t* seg);
  * @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,
index 7a45317018ac3342fa0abbea167d886386081329..e7527275af1370a6e9857d16e185e362ec1c8af5 100644 (file)
@@ -38,8 +38,8 @@
 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)*/
 } auxtrans_param_t;
 
 /**
index 250ef640cca1d9e81f1f255c894dae70c4371cfa..4a3ae767ef201d69d926fdfa89759607a242ebe4 100644 (file)
@@ -72,7 +72,7 @@ boxlist_param_t * get_boxstructure(int fd, OPJ_OFF_T offset, OPJ_SIZE_T length);
 /**
  * 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
  */
@@ -91,7 +91,7 @@ box_param_t * gene_boxbyOffinStream(Byte_t *stream, OPJ_OFF_T offset);
 /**
  * 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
index b43b447c9621aa476052c4684b48e3b9216314ba..9942d59c6c9eb98753ead3537584babd4f617128 100644 (file)
@@ -47,7 +47,7 @@ typedef struct boxheader_param {
 /**
  * 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
  */
index 02c806e0b3f1485db20ae32b1669d56e0c4d0025..3c7a91bef54d163aaf1acba85cfa24b8acf0b7a5 100644 (file)
@@ -42,7 +42,7 @@ typedef uint64_t Byte8_t;
 /**
  * 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
@@ -53,7 +53,7 @@ Byte_t * fetch_bytes(int fd, OPJ_OFF_T offset, OPJ_SIZE_T size);
 /**
  * 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
  */
@@ -62,7 +62,7 @@ Byte_t fetch_1byte(int fd, OPJ_OFF_T offset);
 /**
  * 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
  */
@@ -71,7 +71,7 @@ Byte2_t fetch_2bytebigendian(int fd, OPJ_OFF_T offset);
 /**
  * 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
  */
@@ -80,7 +80,7 @@ Byte4_t fetch_4bytebigendian(int fd, OPJ_OFF_T offset);
 /**
  * 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
  */
@@ -122,7 +122,7 @@ void modify_4Bytecode(Byte4_t code, Byte_t *stream);
 /**
  * Get file size
  *
- * @param[in] fd file discriptor
+ * @param[in] fd file descriptor
  * @return       file size
  */
 OPJ_OFF_T get_filesize(int fd);
index ad97828de91c237a94cb7247da3028439661d802..d0715310f7124305169f772d3d00697487a983f2 100644 (file)
@@ -151,7 +151,7 @@ void enqueue_metadata(Byte8_t meta_id, msgqueue_param_t *msgqueue);
  * 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);
 
index 5913bd0fe38b5de9da5903fde12193ba35365494..a9fab4f80090e73e8451bf99418bdf9a4ca43174 100644 (file)
@@ -159,7 +159,7 @@ typedef struct dec_server_record {
     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*/
 } dec_server_record_t;
 
 
index 1343b1e77a75cecd59806558fc379c40d06dd15f..3e1d2c412428e80e7efd740ac1be58bcfb2b93fb 100644 (file)
@@ -57,7 +57,7 @@ sessionlist_param_t * gene_sessionlist(void);
 
 
 /**
- * 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
index f33306c02f175aa6f44d0f0225e221904e4df58c..44054f30877ed76df767ca073e4835abf3dba6e1 100644 (file)
@@ -51,9 +51,9 @@ typedef int SOCKET;
 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);
index f3f87639720c08d36b1b40479597d0b0d148ffc3..9b55e054a537356fa12a35076cc4d21dd257a9d5 100644 (file)
@@ -939,7 +939,7 @@ int main(int argc, char **argv)
 
                     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);
                     }
                      */
 
index 5199057781d7304468c84b5557ada7f04a53e6ea..c3b9578f6c89617449f30d90f822befde1a59bca 100644 (file)
@@ -82,8 +82,8 @@ set(BLACKLIST_JPEG2000
     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
     issue1438.j2k
    )
 
index 584dfaf7fde68478abaec93697243af2f91afc04..67409f9b4121eec732d51e4c905f204776ca4465 100644 (file)
@@ -6,7 +6,7 @@
 #   + 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 
index 38aa739fe9aa973cf97e350c3d321a4cdd79c636..f36ea4f980b2f57e4f58d9e41a167022aeeaa4e7 100644 (file)
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
 {
 #define NUMJP2 32
   int i, c = 0;
-  long offets[NUMJP2];
+  long offsets[NUMJP2];
   char buffer[512];
 #define BUFLEN 4096
   int cont = 1;
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
       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 );
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
     {
     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 );
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
     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 );
index 85b0c0af53dfbcfcdaffa9c283bda77a3e9c03cf..3a996dbabd3f993847e150661d7ecb77b4d3f645 100644 (file)
@@ -663,7 +663,7 @@ static int parse_cmdline_encoder(int argc, char **argv,
         /* ----------------------------------------------------- */
 
 
-        case 'r': {         /* rates rates/distorsion */
+        case 'r': {         /* rates rates/distortion */
             char *s = opj_optarg;
             while (sscanf(s, "%f", &parameters->tcp_rates[parameters->tcp_numlayers]) ==
                     1) {
@@ -1452,7 +1452,7 @@ static char* create_index_into_byte_array(opj_codestream_info_t *cstr_info,
         + (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);