Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix typos in source comments and doxygen content. Found via `codespell -q 3 -S CHANGES.md,./ASWF/tsc-meetings -L dout,nnumber,offsetp`
Update src/lib/OpenEXR/ImfFastHuf.cpp

Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: Nick Porcino <meshula@hotmail.com>
  • Loading branch information
luzpaz authored and cary-ilm committed Mar 2, 2023
1 parent d6916d1 commit bf615fa
Show file tree
Hide file tree
Showing 41 changed files with 109 additions and 110 deletions.
4 changes: 2 additions & 2 deletions src/lib/OpenEXR/ImfArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ inline
Array2D<T>::Array2D ():
_sizeX(0), _sizeY (0), _data (0)
{
// emtpy
// empty
}


Expand All @@ -200,7 +200,7 @@ inline
Array2D<T>::Array2D (long sizeX, long sizeY):
_sizeX (sizeX), _sizeY (sizeY), _data (new T[sizeX * sizeY])
{
// emtpy
// empty
}


Expand Down
4 changes: 2 additions & 2 deletions src/lib/OpenEXR/ImfB44Compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ pack (const unsigned short s[16],
//
// Compute a set of running differences, r[0] ... r[14]:
// Find a shift value such that after rounding off the
// rightmost bits and shifting all differenes are between
// rightmost bits and shifting all differences are between
// -32 and +31. Then bias the differences so that they
// end up between 0 and 63.
//
Expand Down Expand Up @@ -618,7 +618,7 @@ B44Compressor::compress (const char *inPtr,
}

//
// For each channel, detemine how many pixels are stored
// For each channel, determine how many pixels are stored
// in the input buffer, and where those pixels will be
// placed in _tmpBuffer.
//
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfChannelList.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct IMF_EXPORT_TYPE Channel
// human perception of the quantity represented by this channel
// is closer to linear or closer to logarithmic. Compression
// methods may optimize image quality by adjusting pixel data
// quantization acording to this hint.
// quantization according to this hint.
// For example, perception of red, green, blue and luminance is
// approximately logarithmic; the difference between 0.1 and 0.2
// is perceived to be roughly the same as the difference between
Expand Down
14 changes: 7 additions & 7 deletions src/lib/OpenEXR/ImfDeepScanLineInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1047,11 +1047,11 @@ newLineBufferTask

//
// when handling files with dataWindows with a large number of pixels,
// the sampleCount values are not precached and Data::sampleCount is not asigned
// instead, the sampleCount is read every time readPixels() is called
// the sampleCount values are not precached and Data::sampleCount is not
// assigned instead, the sampleCount is read every time readPixels() is called
// and sample counts are stored in LineBuffer::_tempCountBuffer instead
// (A square image that is 16k by 16k pixels has gBigFileDataWindowSize pixels,
// andthe sampleCount table would take 1GiB of memory to store)
// and the sampleCount table would take 1GiB of memory to store)
//
const uint64_t gBigFileDataWindowSize = (1<<28);

Expand Down Expand Up @@ -1239,8 +1239,8 @@ DeepScanLineInputFile::DeepScanLineInputFile
throw;
}

//
// not multiPart - allocate stream data and intialise as normal
//
// not multiPart - allocate stream data and initialise as normal
//
try
{
Expand Down Expand Up @@ -1315,7 +1315,7 @@ DeepScanLineInputFile::DeepScanLineInputFile
}

//
// not multiPart - allocate stream data and intialise as normal
// not multiPart - allocate stream data and initialise as normal
//
try
{
Expand Down Expand Up @@ -1715,7 +1715,7 @@ DeepScanLineInputFile::readPixels (int scanLine1, int scanLine2)
}

//
// Exeption handling:
// Exception handling:
//
// LineBufferTask::execute() may have encountered exceptions, but
// those exceptions occurred in another thread, not in the thread
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfDeepScanLineOutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ DeepScanLineOutputFile::writePixels (int numScanLines)
}

//
// Exeption handling:
// Exception handling:
//
// LineBufferTask::execute() may have encountered exceptions, but
// those exceptions occurred in another thread, not in the thread
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfDeepTiledInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ DeepTiledInputFile::readTiles (int dx1, int dx2, int dy1, int dy2, int lx, int l
}

//
// Exeption handling:
// Exception handling:
//
// TileBufferTask::execute() may have encountered exceptions, but
// those exceptions occurred in another thread, not in the thread
Expand Down
4 changes: 2 additions & 2 deletions src/lib/OpenEXR/ImfDeepTiledInputFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class IMF_EXPORT_TYPE DeepTiledInputFile : public GenericInputFile
// dy must lie in the interval [0, numYTiles(ly)-1]
//
// lx must lie in the interval [0, numXLevels()-1]
// ly must lie in the inverval [0, numYLevels()-1]
// ly must lie in the interval [0, numYLevels()-1]
//
// readTile(dx, dy, level) is a convenience function used
// for ONE_LEVEL and MIPMAP_LEVELS files. It calls
Expand Down Expand Up @@ -370,7 +370,7 @@ class IMF_EXPORT_TYPE DeepTiledInputFile : public GenericInputFile
// dy must lie in the interval [0, numYTiles(ly)-1]
//
// lx must lie in the interval [0, numXLevels()-1]
// ly must lie in the inverval [0, numYLevels()-1]
// ly must lie in the interval [0, numYLevels()-1]
//
// readPixelSampleCounts(dx1, dx2, dy1, dy2, lx, ly) reads all
// the sample counts for tiles within range
Expand Down
4 changes: 2 additions & 2 deletions src/lib/OpenEXR/ImfDeepTiledInputPart.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class IMF_EXPORT_TYPE DeepTiledInputPart
// dy must lie in the interval [0, numYTiles(ly)-1]
//
// lx must lie in the interval [0, numXLevels()-1]
// ly must lie in the inverval [0, numYLevels()-1]
// ly must lie in the interval [0, numYLevels()-1]
//
// readTile(dx, dy, level) is a convenience function used
// for ONE_LEVEL and MIPMAP_LEVELS files. It calls
Expand Down Expand Up @@ -327,7 +327,7 @@ class IMF_EXPORT_TYPE DeepTiledInputPart
// dy must lie in the interval [0, numYTiles(ly)-1]
//
// lx must lie in the interval [0, numXLevels()-1]
// ly must lie in the inverval [0, numYLevels()-1]
// ly must lie in the interval [0, numYLevels()-1]
//
// readPixelSampleCounts(dx1, dx2, dy1, dy2, lx, ly) reads all
// the sample counts for tiles within range
Expand Down
4 changes: 2 additions & 2 deletions src/lib/OpenEXR/ImfDeepTiledOutputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ TileBufferTask::execute ()
int xOffsetForData = slice.xTileCoords ? tileRange.min.x : 0;
int yOffsetForData = slice.yTileCoords ? tileRange.min.y : 0;

// (TOOD) treat sample count offsets differently.
// (TODO) treat sample count offsets differently.
copyFromDeepFrameBuffer (writePtr,
slice.base,
_ofd->sampleCountSliceBase,
Expand Down Expand Up @@ -1590,7 +1590,7 @@ DeepTiledOutputFile::writeTiles (int dx1, int dx2, int dy1, int dy2,
}

//
// Exeption handling:
// Exception handling:
//
// TileBufferTask::execute() may have encountered exceptions, but
// those exceptions occurred in another thread, not in the thread
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfDeepTiledOutputFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class IMF_EXPORT_TYPE DeepTiledOutputFile : public GenericOutputFile
// dy must lie in the interval [0, numYTiles(ly) - 1]
//
// lx must lie in the interval [0, numXLevels() - 1]
// ly must lie in the inverval [0, numYLevels() - 1]
// ly must lie in the interval [0, numYLevels() - 1]
//
// writeTile(dx, dy, level) is a convenience function
// used for ONE_LEVEL and MIPMAP_LEVEL files. It calls
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfDeepTiledOutputPart.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class IMF_EXPORT_TYPE DeepTiledOutputPart
// dy must lie in the interval [0, numYTiles(ly) - 1]
//
// lx must lie in the interval [0, numXLevels() - 1]
// ly must lie in the inverval [0, numYLevels() - 1]
// ly must lie in the interval [0, numYLevels() - 1]
//
// writeTile(dx, dy, level) is a convenience function
// used for ONE_LEVEL and MIPMAP_LEVEL files. It calls
Expand Down
26 changes: 13 additions & 13 deletions src/lib/OpenEXR/ImfDwaCompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
// into the start of the data block, making a self-contained file.
// If initializeDefaultChannelRules() doesn't quite suite your naming
// conventions, you can adjust the rules without breaking decoder
// compatability.
// compatibility.
//
// If we're going to lossy compress R, G, or B channels, it's easier
// to toss bits in a more perceptual uniform space. One could argue
// at length as to what constitutes perceptually uniform, expecially
// at length as to what constitutes perceptually uniform, especially
// when storing either scene/input/focal plane referred and output referred
// data.
//
Expand Down Expand Up @@ -55,10 +55,10 @@
//
// For each DCT component, we want to find a quantized value that
// is within +- the per-component error. Pick the quantized value
// that has the fewest bits set in its' binary representation.
// Brute-forcing the search would make for extremly inefficient
// compression. Fortunatly, we can precompute a table to assist
// with this search.
// that has the fewest bits set in its' binary representation.
// Brute-forcing the search would make for extremely inefficient
// compression. Fortunately, we can precompute a table to assist
// with this search.
//
// For each 16-bit float value, there are at most 15 other values with
// fewer bits set. We can precompute these values in a compact form, since
Expand Down Expand Up @@ -149,7 +149,7 @@ OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
namespace {

//
// Function pointer to dispatch to an approprate
// Function pointer to dispatch to an appropriate
// convertFloatToHalf64_* impl, based on runtime cpu checking.
// Should be initialized in DwaCompressor::initializeFuncs()
//
Expand Down Expand Up @@ -1686,8 +1686,8 @@ DwaCompressor::LossyDctEncoderBase::quantize (half src, float errorTolerance)
// Try to do a simple RLE scheme to reduce run's of 0's. This
// differs from the jpeg EOB case, since EOB just indicates that
// the rest of the block is zero. In our case, we have lots of
// NaN symbols, which shouldn't be allowed to occur in DCT
// coefficents - so we'll use them for encoding runs.
// NaN symbols, which shouldn't be allowed to occur in DCT
// coefficients - so we'll use them for encoding runs.
//
// If the high byte is 0xff, then we have a run of 0's, of length
// given by the low byte. For example, 0xff03 would be a run
Expand Down Expand Up @@ -3011,8 +3011,8 @@ DwaCompressor::initializeBuffers (size_t &outBufferSize)
static_cast<uint64_t> (compressBound (static_cast<uLong> (unknownBufferSize)));

//
// Allocate a zip/deflate compressor big enought to hold the DC data
// and include it's compressed results in the size requirements
// Allocate a zip/deflate compressor big enough to hold the DC data
// and include its compressed results in the size requirements
// for our output buffer
//

Expand Down Expand Up @@ -3258,8 +3258,8 @@ DwaCompressor::relevantChannelRules (std::vector<Classifier> &rules) const
//
// Take our initial list of channels, and cache the contents.
//
// Determine approprate compression schemes for each channel,
// and figure out which sets should potentially be CSC'ed
// Determine appropriate compression schemes for each channel,
// and figure out which sets should potentially be CSC'ed
// prior to lossy compression.
//

Expand Down
4 changes: 2 additions & 2 deletions src/lib/OpenEXR/ImfDwaCompressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class DwaCompressor: public Compressor
// Populate our cached version of the channel data with
// data from the real channel list. We want to
// copy over attributes, determine compression schemes
// releveant for the channel type, and find sets of
// channels to be compressed from Y'CbCr data instead
// relevant for the channel type, and find sets of
// channels to be compressed from Y'CbCr data instead
// of R'G'B'.
//

Expand Down
10 changes: 5 additions & 5 deletions src/lib/OpenEXR/ImfDwaCompressorSimd.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ convertFloatToHalf64_f16c (unsigned short *dst, float *src)
//
// Now, it's quite likely that we'll find ourselves in situations
// where we want to build *without* VEX, in order to maintain
// maximum compatability. But to get there with intrinsics,
// maximum compatibility. But to get there with intrinsics,
// we'd need to break out code into a separate file. Bleh.
// I'll take the asm.
//
Expand Down Expand Up @@ -605,8 +605,8 @@ fromHalfZigZag_scalar (unsigned short *src, float *dst)
// the even rows are in descending order.
//
// If we 'fold' the bottom half up into the top, we can preserve ordered
// runs accross rows, and still keep all the correct values in columns.
// After transposing, we'll need to rotate things back into place.
// runs across rows, and still keep all the correct values in columns.
// After transposing, we'll need to rotate things back into place.
// This gives us:
//
// 0 | 42 41 40 39 38 37 36
Expand Down Expand Up @@ -691,7 +691,7 @@ fromHalfZigZag_f16c (unsigned short *src, float *dst)

/* Reverse the even rows. We're not using PSHUFB as
* that requires loading an extra constant all the time,
* and we're alreadly pretty memory bound.
* and we're already pretty memory bound.
*/

"vpshuflw $0x1b, %%xmm0, %%xmm0 \n"
Expand Down Expand Up @@ -1293,7 +1293,7 @@ dctInverse8x8_sse2 (float *data)
* they depend.
*
* This should work for the cases where we have 2-8 full rows.
* the 1-row case is special, and we'll handle it seperately.
* the 1-row case is special, and we'll handle it separately.
*/
#define IDCT_AVX_BODY \
/* ==============================================
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfEnvmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// values.
//
// For each possible EnvmapAttribute value, this header file also
// defines a set of convienience functions to convert between 3D
// defines a set of convenience functions to convert between 3D
// directions and 2D pixel locations.
//
// Most of the convenience functions defined below require a
Expand Down
8 changes: 4 additions & 4 deletions src/lib/OpenEXR/ImfFastHuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ FastHufDecoder::FastHufDecoder

//
// The 'offset' table is the position (in sorted order) of the first id
// of a given code lenght. Array is indexed by code length, like base.
// of a given code length. Array is indexed by code length, like base.
//

uint64_t offset[MAX_CODE_LEN + 1];
Expand Down Expand Up @@ -515,7 +515,7 @@ FastHufDecoder::refill
//
// We can have cases where the previous shift of bufferBack is << 64 -
// this is an undefined operation but tends to create just zeroes.
// so if we won't have any bits left, zero out bufferBack insetad of computing the shift
// so if we won't have any bits left, zero out bufferBack instead of computing the shift
//

if (bufferBackNumBits <= numBits)
Expand Down Expand Up @@ -559,7 +559,7 @@ FastHufDecoder::readBits
// small-ish table to accelerate decoding of short codes.
//
// If possible, try looking up codes into the acceleration table.
// This has a few benifits - there's no search involved; We don't
// This has a few benefits - there's no search involved; We don't
// need an additional lookup to map id to symbol; we don't need
// a full 64-bits (so less refilling).
//
Expand Down Expand Up @@ -680,7 +680,7 @@ FastHufDecoder::decode
bufferNumBits -= codeLen;

//
// If we recieved a RLE symbol (_rleSymbol), then we need
// If we received a RLE symbol (_rleSymbol), then we need
// to read ahead 8 bits to know how many times to repeat
// the previous symbol. Need to ensure we at least have
// 8 bits of data in the buffer
Expand Down
4 changes: 2 additions & 2 deletions src/lib/OpenEXR/ImfFastHuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
//
// The premise is that instead of working directly with the coded
// symbols, we create a new ordering based on the frequency of symbols.
// Less frequent symbols (and thus longer codes) are ordered earler.
// We're calling the values in this ordering 'Ids', as oppsed to
// Less frequent symbols (and thus longer codes) are ordered earlier.
// We're calling the values in this ordering 'Ids', as oppsed to
// 'Symbols' - which are the short values we eventually want decoded.
//
// With this new ordering, a few small tables can be derived ('base'
Expand Down
4 changes: 2 additions & 2 deletions src/lib/OpenEXR/ImfHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ class IMF_EXPORT_TYPE Header
//-------------------------------------------------------------
// Sanity check -- examines the header, and throws an exception
// if it finds something wrong (empty display window, negative
// pixel aspect ratio, unknown compression sceme etc.)
// pixel aspect ratio, unknown compression scheme etc...)
//
// set isTiled to true if you are checking a tiled/multi-res
// header
Expand All @@ -440,7 +440,7 @@ class IMF_EXPORT_TYPE Header


//----------------------------------------------------------------
// Maximum image size and maximim tile size:
// Maximum image size and maximum tile size:
//
// sanityCheck() will throw an exception if the width or height of
// the data window exceeds the maximum image width or height, or
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ bufferedReadPixels (InputFile::Data* ifd, int scanLine1, int scanLine2)
//
// bufferedReadPixels reads each row of tiles that intersect the
// scan-line range (scanLine1 to scanLine2). The previous row of
// tiles is cached in order to prevent redundent tile reads when
// tiles is cached in order to prevent redundant tile reads when
// accessing scanlines sequentially.
//

Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfKeyCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// class KeyCode
//
// A KeyCode object uniquely identifies a motion picture film frame.
// The following fields specifiy film manufacturer, film type, film
// The following fields specify film manufacturer, film type, film
// roll and the frame's position within the roll:
//
// filmMfcCode film manufacturer code
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfOptimizedPixelReading.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class OptimizationMode


//------------------------------------------------------------------------
// Test for SSE pointer alignemnt
// Test for SSE pointer alignment
//------------------------------------------------------------------------
EXR_FORCEINLINE
bool
Expand Down
Loading

0 comments on commit bf615fa

Please sign in to comment.