Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trivial typo fixes #117

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/apps/ojph_compress/ojph_compress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ int main(int argc, char * argv[]) {
" a codeblock. In unix-like environment, { and } must be\n"
" proceeded by a ""\\""\n"
" -precincts {x,y},{x,y},...,{x,y} where {x,y} is the precinct size\n"
" starting from the coarest resolution; the last precinct\n"
" starting from the coarsest resolution; the last precinct\n"
" is repeated for all finer resolutions\n"
" -tile_offset {x,y} tile offset. \n"
" -tile_size {x,y} tile width and height. \n"
Expand Down Expand Up @@ -900,7 +900,7 @@ int main(int argc, char * argv[]) {
cod.set_progression_order(prog_order);
if (employ_color_transform != -1)
OJPH_ERROR(0x01000086,
"color transform is not meaningless since .raw files are single "
"color transform is meaningless since .raw files are single "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or "...is not meaningful..." which is harder to understand but maybe softer language.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Brad,
Thank you for catching all these typos.
Kind regards,
Aous.

I am fine with meaningless here.

"component files");
cod.set_reversible(reversible);
if (!reversible && quantization_step != -1.0f)
Expand Down
16 changes: 8 additions & 8 deletions src/apps/ojph_expand/ojph_expand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ struct ui32_list_interpreter : public ojph::cli_interpreter::arg_inter_base
{
if (num_eles)
{
if (*next_char != ',') //separate sizes by a comma
throw "sizes in a sizes list must be separated by a comma";
if (*next_char != ',') //separate res by a comma
throw "resolutions in a list must be separated by a comma";
next_char++;
}
char *endptr;
si32list[num_eles] = (ojph::ui32)strtoul(next_char, &endptr, 10);
if (endptr == next_char)
throw "size number is improperly formatted";
throw "res number is improperly formatted";
next_char = endptr;
++num_eles;
}
Expand All @@ -81,7 +81,7 @@ struct ui32_list_interpreter : public ojph::cli_interpreter::arg_inter_base
throw "list elements must separated by a "",""";
}
else if (*next_char)
throw "there are too many elements in the size list";
throw "there are too many elements in the resolution list";
}

const int max_num_eles;
Expand Down Expand Up @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) {
try {
if (output_filename == NULL)
OJPH_ERROR(0x020000008,
"Please provide and output file using the -o option\n");
"Please provide an output file using the -o option\n");

ojph::j2c_infile j2c_file;
j2c_file.open(input_filename);
Expand Down Expand Up @@ -233,7 +233,7 @@ int main(int argc, char *argv[]) {
if (siz.get_num_components() != 1)
OJPH_ERROR(0x020000001,
"The file has more than one color component, but .pgm can "
"contain only on color component\n");
"contain only one color component\n");
ppm.configure(siz.get_recon_width(0), siz.get_recon_height(0),
siz.get_num_components(), siz.get_bit_depth(0));
ppm.open(output_filename);
Expand All @@ -258,7 +258,7 @@ int main(int argc, char *argv[]) {
if (!all_same)
OJPH_ERROR(0x020000003,
"To save an image to ppm, all the components must have the "
"downsampling ratio\n");
"same downsampling ratio\n");
ppm.configure(siz.get_recon_width(0), siz.get_recon_height(0),
siz.get_num_components(), siz.get_bit_depth(0));
ppm.open(output_filename);
Expand All @@ -280,7 +280,7 @@ int main(int argc, char *argv[]) {
if (!all_same)
OJPH_ERROR(0x020000008,
"To save an image to tif(f), all the components must have the "
"downsampling ratio\n");
"same downsampling ratio\n");
ojph::ui32 bit_depths[4] = { 0, 0, 0, 0 };
for (ojph::ui32 c = 0; c < siz.get_num_components(); c++)
{
Expand Down
6 changes: 3 additions & 3 deletions src/apps/others/ojph_img_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ namespace ojph {
{
close();
OJPH_ERROR(0x030000005, "wrong file extension, a file with keyword P6 "
"must have a .ppm extension fir file %s", filename);
"must have a .ppm extension for file %s", filename);
}

// set number of components based on file-type
Expand Down Expand Up @@ -309,7 +309,7 @@ namespace ojph {
temp_buf = malloc(temp_buf_byte_size);
if (temp_buf == NULL) { // failed to allocate memory
if (t) free(t); // the original buffer is still valid
OJPH_ERROR(0x030000007, "error allocating mmeory");
OJPH_ERROR(0x030000007, "error allocating memory");
}
}
else
Expand Down Expand Up @@ -586,7 +586,7 @@ namespace ojph {
// Error on known incompatilbe input formats
if( tiff_bits_per_sample != 8 && tiff_bits_per_sample != 16 )
{
OJPH_ERROR(0x0300000B3, "\nTIFF IO is currently limited to file limited"
OJPH_ERROR(0x0300000B3, "\nTIFF IO is currently limited"
" to files with TIFFTAG_BITSPERSAMPLE=8 and TIFFTAG_BITSPERSAMPLE=16 \n"
"input file = %s has TIFFTAG_BITSPERSAMPLE=%d",
filename, tiff_bits_per_sample);
Expand Down
10 changes: 5 additions & 5 deletions src/core/coding/ojph_block_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ namespace ojph {
* \li \c cwd_len : 3bits -> the codeword length of the VLC codeword;
* the VLC cwd is in the LSB of bitstream \n
* \li \c u_off : 1bit -> u_offset, which is 1 if u value is not 0 \n
* \li \c rho : 4bits -> signficant samples within a quad \n
* \li \c rho : 4bits -> significant samples within a quad \n
* \li \c e_1 : 4bits -> EMB e_1 \n
* \li \c e_k : 4bits -> EMB e_k \n
* \n
* The table index is 10 bits and composed of two parts: \n
* The 7 LSBs contain a codeword which might be shorter than 7 bits;
* this word is the next decoable bits in the bitstream. \n
* this word is the next decodable bits in the bitstream. \n
* The 3 MSB is the context of for the codeword. \n
*/

Expand All @@ -75,7 +75,7 @@ namespace ojph {
//************************************************************************/
/** @defgroup uvlc_decoding_tables_grp VLC decoding tables
* @{
* UVLC decoding tables used to partiallu decode u values from UVLC
* UVLC decoding tables used to partially decode u values from UVLC
* codewords. \n
* The table index is 8 (or 9) bits and composed of two parts: \n
* The 6 LSBs carries the head of the VLC to be decoded. Up to 6 bits to
Expand Down Expand Up @@ -109,7 +109,7 @@ namespace ojph {

//Data in the table is arranged in this format (taken from the standard)
// c_q is the context for a quad
// rho is the signficance pattern for a quad
// rho is the significance pattern for a quad
// u_off indicate if u value is 0 (u_off is 0), or communicated
// e_k, e_1 EMB patterns
// cwd VLC codeword
Expand All @@ -132,7 +132,7 @@ namespace ojph {
if (debug) memset(vlc_tbl0, 0, sizeof(vlc_tbl0)); //unnecessary

// this is to convert table entries into values for decoder look up
// There can be at most 1024 possibilites, not all of them are valid.
// There can be at most 1024 possibilities, not all of them are valid.
//
for (int i = 0; i < 1024; ++i)
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/coding/ojph_block_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace ojph {
dec_mel_st() : data(NULL), tmp(0), bits(0), size(0), unstuff(false),
k(0), num_runs(0), runs(0)
{}
// data decoding machinary
// data decoding machinery
ui8* data; //!<the address of data (or bitstream)
ui64 tmp; //!<temporary buffer for read data
int bits; //!<number of bits stored in tmp
Expand Down Expand Up @@ -505,7 +505,7 @@ namespace ojph {
* an architecture that read size must be compatible with the
* alignment of the read address
*
* There is another simiar subroutine rev_init. This subroutine does
* There is another similar subroutine rev_init. This subroutine does
* NOT skip the first 12 bits, and starts with unstuff set to true.
*
* @param [in] mrp is a pointer to rev_struct structure
Expand Down
6 changes: 3 additions & 3 deletions src/core/coding/ojph_block_decoder_ssse3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace ojph {
dec_mel_st() : data(NULL), tmp(0), bits(0), size(0), unstuff(false),
k(0), num_runs(0), runs(0)
{}
// data decoding machinary
// data decoding machinery
ui8* data; //!<the address of data (or bitstream)
ui64 tmp; //!<temporary buffer for read data
int bits; //!<number of bits stored in tmp
Expand Down Expand Up @@ -507,7 +507,7 @@ namespace ojph {
* an architecture that read size must be compatible with the
* alignment of the read address
*
* There is another simiar subroutine rev_init. This subroutine does
* There is another similar subroutine rev_init. This subroutine does
* NOT skip the first 12 bits, and starts with unstuff set to true.
*
* @param [in] mrp is a pointer to rev_struct structure
Expand Down Expand Up @@ -596,7 +596,7 @@ namespace ojph {
* 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 16 bytes.
Expand Down
4 changes: 2 additions & 2 deletions src/core/coding/ojph_block_decoder_wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace ojph {
dec_mel_st() : data(NULL), tmp(0), bits(0), size(0), unstuff(false),
k(0), num_runs(0), runs(0)
{}
// data decoding machinary
// data decoding machinery
ui8* data; //!<the address of data (or bitstream)
ui64 tmp; //!<temporary buffer for read data
int bits; //!<number of bits stored in tmp
Expand Down Expand Up @@ -515,7 +515,7 @@ namespace ojph {
* an architecture that read size must be compatible with the
* alignment of the read address
*
* There is another simiar subroutine rev_init. This subroutine does
* There is another similar subroutine rev_init. This subroutine does
* NOT skip the first 12 bits, and starts with unstuff set to true.
*
* @param [in] mrp is a pointer to rev_struct structure
Expand Down