mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
cosmetics: fix some typos
Change-Id: I0d6efebd817815139db5ae87236fd8911df4d53c
This commit is contained in:
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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_;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user