From 4931c3294bad8257cfd5bb98dbc4ff7eb7dbfbf7 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 26 Nov 2013 19:21:14 -0800 Subject: [PATCH] cosmetics: fix some typos Change-Id: I0d6efebd817815139db5ae87236fd8911df4d53c --- src/dec/alpha.c | 2 +- src/dsp/enc_neon.c | 2 +- src/dsp/enc_sse2.c | 2 +- src/dsp/upsampling_sse2.c | 2 +- src/enc/alpha.c | 2 +- src/enc/backward_references.c | 2 +- src/enc/frame.c | 2 +- src/enc/iterator.c | 2 +- src/enc/quant.c | 6 +++--- src/enc/vp8enci.h | 2 +- src/enc/webpenc.c | 2 +- src/utils/bit_writer.c | 2 +- src/utils/huffman_encode.c | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/dec/alpha.c b/src/dec/alpha.c index 70e13bcc..e2fc4527 100644 --- a/src/dec/alpha.c +++ b/src/dec/alpha.c @@ -85,7 +85,7 @@ static int ALPHInit(ALPHDecoder* const dec, const uint8_t* data, } // Decodes, unfilters and dequantizes *at least* 'num_rows' rows of alpha -// starting from row number 'row'. It assumes that rows upto (row - 1) have +// starting from row number 'row'. It assumes that rows up to (row - 1) have // already been decoded. // Returns false in case of bitstream error. static int ALPHDecode(VP8Decoder* const dec, int row, int num_rows) { diff --git a/src/dsp/enc_neon.c b/src/dsp/enc_neon.c index eb256e68..0a78837a 100644 --- a/src/dsp/enc_neon.c +++ b/src/dsp/enc_neon.c @@ -493,7 +493,7 @@ static int Disto4x4(const uint8_t* const a, const uint8_t* const b, // q12/14 tmp[12-15] // These are still in 01 45 23 67 order. We fix it easily in the addition - // case but the subtraction propegates them. + // case but the subtraction propagates them. "vswp d3, d27 \n" "vswp d19, d31 \n" diff --git a/src/dsp/enc_sse2.c b/src/dsp/enc_sse2.c index 032e9907..6b21dc2d 100644 --- a/src/dsp/enc_sse2.c +++ b/src/dsp/enc_sse2.c @@ -644,7 +644,7 @@ static int TTransformSSE2(const uint8_t* inA, const uint8_t* inB, __m128i tmp_0, tmp_1, tmp_2, tmp_3; const __m128i zero = _mm_setzero_si128(); - // Load, combine and tranpose inputs. + // Load, combine and transpose inputs. { const __m128i inA_0 = _mm_loadl_epi64((__m128i*)&inA[BPS * 0]); const __m128i inA_1 = _mm_loadl_epi64((__m128i*)&inA[BPS * 1]); diff --git a/src/dsp/upsampling_sse2.c b/src/dsp/upsampling_sse2.c index c30cd3a0..a1072fb7 100644 --- a/src/dsp/upsampling_sse2.c +++ b/src/dsp/upsampling_sse2.c @@ -51,7 +51,7 @@ extern "C" { (out) = _mm_sub_epi8(tmp0, tmp4); /* (k + in + 1) / 2 - lsb_correction */ \ } while (0) -// pack and store two alterning pixel rows +// pack and store two alternating pixel rows #define PACK_AND_STORE(a, b, da, db, out) do { \ const __m128i t_a = _mm_avg_epu8(a, da); /* (9a + 3b + 3c + d + 8) / 16 */ \ const __m128i t_b = _mm_avg_epu8(b, db); /* (3a + 9b + c + 3d + 8) / 16 */ \ diff --git a/src/enc/alpha.c b/src/enc/alpha.c index b6168cdf..dd2ea5f0 100644 --- a/src/enc/alpha.c +++ b/src/enc/alpha.c @@ -201,7 +201,7 @@ static uint32_t GetFilterMap(const uint8_t* alpha, int width, int height, const int kMinColorsForFilterNone = 16; const int kMaxColorsForFilterNone = 192; const int num_colors = GetNumColors(alpha, width, height, width); - // For low number of colors, NONE yeilds better compression. + // For low number of colors, NONE yields better compression. filter = (num_colors <= kMinColorsForFilterNone) ? WEBP_FILTER_NONE : EstimateBestFilter(alpha, width, height, width); bit_map |= 1 << filter; diff --git a/src/enc/backward_references.c b/src/enc/backward_references.c index 79cc236f..77b4be74 100644 --- a/src/enc/backward_references.c +++ b/src/enc/backward_references.c @@ -156,7 +156,7 @@ static void GetParamsForHashChainFindCopy(int quality, int xsize, *window_size = (max_window_size > WINDOW_SIZE) ? WINDOW_SIZE : max_window_size; *iter_pos = 8 + (quality >> 3); - // For lower entropy images, the rigourous search loop in HashChainFindCopy + // For lower entropy images, the rigorous search loop in HashChainFindCopy // can be relaxed. *iter_limit = (cache_bits > 0) ? iter_neg : iter_neg / 2; } diff --git a/src/enc/frame.c b/src/enc/frame.c index cb0959b1..1b296d03 100644 --- a/src/enc/frame.c +++ b/src/enc/frame.c @@ -739,7 +739,7 @@ static double GetPSNR(uint64_t mse, uint64_t size) { //------------------------------------------------------------------------------ // StatLoop(): only collect statistics (number of skips, token usage, ...). // This is used for deciding optimal probabilities. It also modifies the -// quantizer value if some target (size, PNSR) was specified. +// quantizer value if some target (size, PSNR) was specified. static void SetLoopParams(VP8Encoder* const enc, float q) { // Make sure the quality parameter is inside valid bounds diff --git a/src/enc/iterator.c b/src/enc/iterator.c index ed71423a..0fb6ca5f 100644 --- a/src/enc/iterator.c +++ b/src/enc/iterator.c @@ -285,7 +285,7 @@ void VP8IteratorBytesToNz(VP8EncIterator* const it) { #undef BIT //------------------------------------------------------------------------------ -// Advance to the next position, doing the bookeeping. +// Advance to the next position, doing the bookkeeping. void VP8IteratorSaveBoundary(VP8EncIterator* const it) { VP8Encoder* const enc = it->enc_; diff --git a/src/enc/quant.c b/src/enc/quant.c index 573549ac..a287d61c 100644 --- a/src/enc/quant.c +++ b/src/enc/quant.c @@ -25,7 +25,7 @@ #define MID_ALPHA 64 // neutral value for susceptibility #define MIN_ALPHA 30 // lowest usable value for susceptibility -#define MAX_ALPHA 100 // higher meaninful value for susceptibility +#define MAX_ALPHA 100 // higher meaningful value for susceptibility #define SNS_TO_DQ 0.9 // Scaling constant between the sns value and the QP // power-law modulation. Must be strictly less than 1. @@ -292,7 +292,7 @@ static double QualityToCompression(double c) { // exponent is somewhere between 2.8 and 3.2, but we're mostly interested // in the mid-quant range. So we scale the compressibility inversely to // this power-law: quant ~= compression ^ 1/3. This law holds well for - // low quant. Finer modelling for high-quant would make use of kAcTable[] + // low quant. Finer modeling for high-quant would make use of kAcTable[] // more explicitly. const double v = pow(linear_c, 1 / 3.); return v; @@ -814,7 +814,7 @@ static int ReconstructUV(VP8EncIterator* const it, VP8ModeScore* const rd, //------------------------------------------------------------------------------ // RD-opt decision. Reconstruct each modes, evalue distortion and bit-cost. -// Pick the mode is lower RD-cost = Rate + lamba * Distortion. +// Pick the mode is lower RD-cost = Rate + lambda * Distortion. static void StoreMaxDelta(VP8SegmentInfo* const dqm, const int16_t DCs[16]) { // We look at the first three AC coefficients to determine what is the average diff --git a/src/enc/vp8enci.h b/src/enc/vp8enci.h index 7e41dba0..be7b9a80 100644 --- a/src/enc/vp8enci.h +++ b/src/enc/vp8enci.h @@ -256,7 +256,7 @@ typedef struct { int lambda_trellis_i16_, lambda_trellis_i4_, lambda_trellis_uv_; } VP8SegmentInfo; -// Handy transcient struct to accumulate score and info during RD-optimization +// Handy transient struct to accumulate score and info during RD-optimization // and mode evaluation. typedef struct { score_t D, SD; // Distortion, spectral distortion diff --git a/src/enc/webpenc.c b/src/enc/webpenc.c index 2b372f5a..83117d7b 100644 --- a/src/enc/webpenc.c +++ b/src/enc/webpenc.c @@ -157,7 +157,7 @@ static void MapConfigToTools(VP8Encoder* const enc) { // non-zero: 196 // lf-stats: 2048 // total: 68635 -// Transcient object sizes: +// Transient object sizes: // VP8EncIterator: 352 // VP8ModeScore: 912 // VP8SegmentInfo: 532 diff --git a/src/utils/bit_writer.c b/src/utils/bit_writer.c index 5d8f5f06..c57cb45a 100644 --- a/src/utils/bit_writer.c +++ b/src/utils/bit_writer.c @@ -256,7 +256,7 @@ void VP8LWriteBits(VP8LBitWriter* const bw, int n_bits, uint32_t bits) { uint8_t* p = &bw->buf_[bw->bit_pos_ >> 3]; const int bits_reserved_in_first_byte = bw->bit_pos_ & 7; const int bits_left_to_write = n_bits - 8 + bits_reserved_in_first_byte; - // implicit & 0xff is assumed for uint8_t arithmetics + // implicit & 0xff is assumed for uint8_t arithmetic *p++ |= bits << bits_reserved_in_first_byte; bits >>= 8 - bits_reserved_in_first_byte; if (bits_left_to_write >= 1) { diff --git a/src/utils/huffman_encode.c b/src/utils/huffman_encode.c index 96086663..9c598673 100644 --- a/src/utils/huffman_encode.c +++ b/src/utils/huffman_encode.c @@ -27,7 +27,7 @@ static int ValuesShouldBeCollapsedToStrideAverage(int a, int b) { } // Change the population counts in a way that the consequent -// Hufmann tree compression, especially its RLE-part, give smaller output. +// Huffman tree compression, especially its RLE-part, give smaller output. static int OptimizeHuffmanForRle(int length, int* const counts) { uint8_t* good_for_rle; // 1) Let's make the Huffman code more compatible with rle encoding.