Merge "cosmetics: fix some typos"

This commit is contained in:
James Zern 2013-11-27 17:04:00 -08:00 committed by Gerrit Code Review
commit c536afb57b
13 changed files with 15 additions and 15 deletions

View File

@ -493,7 +493,7 @@ static int Disto4x4(const uint8_t* const a, const uint8_t* const b,
// q12/14 tmp[12-15] // q12/14 tmp[12-15]
// These are still in 01 45 23 67 order. We fix it easily in the addition // 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 d3, d27 \n"
"vswp d19, d31 \n" "vswp d19, d31 \n"

View File

@ -644,7 +644,7 @@ static int TTransformSSE2(const uint8_t* inA, const uint8_t* inB,
__m128i tmp_0, tmp_1, tmp_2, tmp_3; __m128i tmp_0, tmp_1, tmp_2, tmp_3;
const __m128i zero = _mm_setzero_si128(); 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_0 = _mm_loadl_epi64((__m128i*)&inA[BPS * 0]);
const __m128i inA_1 = _mm_loadl_epi64((__m128i*)&inA[BPS * 1]); const __m128i inA_1 = _mm_loadl_epi64((__m128i*)&inA[BPS * 1]);

View File

@ -51,7 +51,7 @@ extern "C" {
(out) = _mm_sub_epi8(tmp0, tmp4); /* (k + in + 1) / 2 - lsb_correction */ \ (out) = _mm_sub_epi8(tmp0, tmp4); /* (k + in + 1) / 2 - lsb_correction */ \
} while (0) } 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 { \ #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_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 */ \ const __m128i t_b = _mm_avg_epu8(b, db); /* (3a + 9b + c + 3d + 8) / 16 */ \

View File

@ -201,7 +201,7 @@ static uint32_t GetFilterMap(const uint8_t* alpha, int width, int height,
const int kMinColorsForFilterNone = 16; const int kMinColorsForFilterNone = 16;
const int kMaxColorsForFilterNone = 192; const int kMaxColorsForFilterNone = 192;
const int num_colors = GetNumColors(alpha, width, height, width); 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 : filter = (num_colors <= kMinColorsForFilterNone) ? WEBP_FILTER_NONE :
EstimateBestFilter(alpha, width, height, width); EstimateBestFilter(alpha, width, height, width);
bit_map |= 1 << filter; bit_map |= 1 << filter;

View File

@ -156,7 +156,7 @@ static void GetParamsForHashChainFindCopy(int quality, int xsize,
*window_size = (max_window_size > WINDOW_SIZE) ? WINDOW_SIZE *window_size = (max_window_size > WINDOW_SIZE) ? WINDOW_SIZE
: max_window_size; : max_window_size;
*iter_pos = 8 + (quality >> 3); *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. // can be relaxed.
*iter_limit = (cache_bits > 0) ? iter_neg : iter_neg / 2; *iter_limit = (cache_bits > 0) ? iter_neg : iter_neg / 2;
} }

View File

@ -739,7 +739,7 @@ static double GetPSNR(uint64_t mse, uint64_t size) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// StatLoop(): only collect statistics (number of skips, token usage, ...). // StatLoop(): only collect statistics (number of skips, token usage, ...).
// This is used for deciding optimal probabilities. It also modifies the // 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) { static void SetLoopParams(VP8Encoder* const enc, float q) {
// Make sure the quality parameter is inside valid bounds // Make sure the quality parameter is inside valid bounds

View File

@ -285,7 +285,7 @@ void VP8IteratorBytesToNz(VP8EncIterator* const it) {
#undef BIT #undef BIT
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Advance to the next position, doing the bookeeping. // Advance to the next position, doing the bookkeeping.
void VP8IteratorSaveBoundary(VP8EncIterator* const it) { void VP8IteratorSaveBoundary(VP8EncIterator* const it) {
VP8Encoder* const enc = it->enc_; VP8Encoder* const enc = it->enc_;

View File

@ -25,7 +25,7 @@
#define MID_ALPHA 64 // neutral value for susceptibility #define MID_ALPHA 64 // neutral value for susceptibility
#define MIN_ALPHA 30 // lowest usable 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 #define SNS_TO_DQ 0.9 // Scaling constant between the sns value and the QP
// power-law modulation. Must be strictly less than 1. // 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 // 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 // in the mid-quant range. So we scale the compressibility inversely to
// this power-law: quant ~= compression ^ 1/3. This law holds well for // 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. // more explicitly.
const double v = pow(linear_c, 1 / 3.); const double v = pow(linear_c, 1 / 3.);
return v; 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. // 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]) { 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 // We look at the first three AC coefficients to determine what is the average

View File

@ -256,7 +256,7 @@ typedef struct {
int lambda_trellis_i16_, lambda_trellis_i4_, lambda_trellis_uv_; int lambda_trellis_i16_, lambda_trellis_i4_, lambda_trellis_uv_;
} VP8SegmentInfo; } 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. // and mode evaluation.
typedef struct { typedef struct {
score_t D, SD; // Distortion, spectral distortion score_t D, SD; // Distortion, spectral distortion

View File

@ -157,7 +157,7 @@ static void MapConfigToTools(VP8Encoder* const enc) {
// non-zero: 196 // non-zero: 196
// lf-stats: 2048 // lf-stats: 2048
// total: 68635 // total: 68635
// Transcient object sizes: // Transient object sizes:
// VP8EncIterator: 352 // VP8EncIterator: 352
// VP8ModeScore: 912 // VP8ModeScore: 912
// VP8SegmentInfo: 532 // VP8SegmentInfo: 532

View File

@ -256,7 +256,7 @@ void VP8LWriteBits(VP8LBitWriter* const bw, int n_bits, uint32_t bits) {
uint8_t* p = &bw->buf_[bw->bit_pos_ >> 3]; uint8_t* p = &bw->buf_[bw->bit_pos_ >> 3];
const int bits_reserved_in_first_byte = bw->bit_pos_ & 7; 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; 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; *p++ |= bits << bits_reserved_in_first_byte;
bits >>= 8 - bits_reserved_in_first_byte; bits >>= 8 - bits_reserved_in_first_byte;
if (bits_left_to_write >= 1) { if (bits_left_to_write >= 1) {

View File

@ -27,7 +27,7 @@ static int ValuesShouldBeCollapsedToStrideAverage(int a, int b) {
} }
// Change the population counts in a way that the consequent // 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) { static int OptimizeHuffmanForRle(int length, int* const counts) {
uint8_t* good_for_rle; uint8_t* good_for_rle;
// 1) Let's make the Huffman code more compatible with rle encoding. // 1) Let's make the Huffman code more compatible with rle encoding.