diff --git a/src/enc/cost.h b/src/enc/cost.h index b80bb106..287091c6 100644 --- a/src/enc/cost.h +++ b/src/enc/cost.h @@ -27,7 +27,8 @@ static inline int VP8BitCost(int bit, uint8_t proba) { } // Cost of coding 'nb' 1's and 'total-nb' 0's using 'proba' probability. -static inline uint64_t VP8BranchCost(uint64_t nb, uint64_t total, uint8_t proba) { +static inline uint64_t VP8BranchCost(uint64_t nb, uint64_t total, + uint8_t proba) { return nb * VP8BitCost(1, proba) + (total - nb) * VP8BitCost(0, proba); } diff --git a/src/enc/iterator.c b/src/enc/iterator.c index 772f97f2..3a8ad048 100644 --- a/src/enc/iterator.c +++ b/src/enc/iterator.c @@ -216,7 +216,8 @@ void VP8IteratorBytesToNz(VP8EncIterator* const it) { nz |= (it->top_nz_[6] << 22) | (it->top_nz_[7] << 23); nz |= (it->top_nz_[8] << 24); // we propagate the _top_ bit, esp. for intra4 // left - nz |= (it->left_nz_[0] << 3) | (it->left_nz_[1] << 7) | (it->left_nz_[2] << 11); + nz |= (it->left_nz_[0] << 3) | (it->left_nz_[1] << 7); + nz |= (it->left_nz_[2] << 11); nz |= (it->left_nz_[4] << 17) | (it->left_nz_[6] << 21); *it->nz_ = nz; diff --git a/src/enc/picture.c b/src/enc/picture.c index daf61919..b6446622 100644 --- a/src/enc/picture.c +++ b/src/enc/picture.c @@ -242,7 +242,7 @@ static inline void ImportRow(const uint8_t* src, int src_width, const int32_t base = src[x_in++]; const int32_t frac = base * (-x_accum); frow[x_out] = (sum + base) * dst_width - frac; - sum = MULT(frac, fx_scale); // fresh fractional start for next pixel + sum = MULT(frac, fx_scale); // fresh fractional start for next pixel } } } else { // simple bilinear interpolation diff --git a/src/enc/vp8enci.h b/src/enc/vp8enci.h index e6a72d0f..e7194ad3 100644 --- a/src/enc/vp8enci.h +++ b/src/enc/vp8enci.h @@ -261,7 +261,7 @@ typedef struct { uint8_t* preds_; // intra mode predictors (4x4 blocks) uint32_t* nz_; // non-zero pattern uint8_t i4_boundary_[37]; // 32+5 boundary samples needed by intra4x4 - uint8_t* i4_top_; // pointer to the current *top boundary sample + uint8_t* i4_top_; // pointer to the current top boundary sample int i4_; // current intra4x4 mode being tested int top_nz_[9]; // top-non-zero context. int left_nz_[9]; // left-non-zero. left_nz[8] is independent.