remove unused VP8TokenToStats() function
BUG=webp:355 Change-Id: I0ad6f13003ef7201431c54c7db395254191de67c
This commit is contained in:
parent
61e535f1ac
commit
e51bdd439c
@ -194,39 +194,6 @@ int VP8RecordCoeffTokens(int ctx, const struct VP8Residual* const res,
|
||||
|
||||
#undef TOKEN_ID
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// This function works, but isn't currently used. Saved for later.
|
||||
|
||||
#if 0
|
||||
|
||||
static void Record(int bit, proba_t* const stats) {
|
||||
proba_t p = *stats;
|
||||
if (p >= 0xffff0000u) { // an overflow is inbound.
|
||||
p = ((p + 1u) >> 1) & 0x7fff7fffu; // -> divide the stats by 2.
|
||||
}
|
||||
// record bit count (lower 16 bits) and increment total count (upper 16 bits).
|
||||
p += 0x00010000u + bit;
|
||||
*stats = p;
|
||||
}
|
||||
|
||||
void VP8TokenToStats(const VP8TBuffer* const b, proba_t* const stats) {
|
||||
const VP8Tokens* p = b->pages_;
|
||||
while (p != NULL) {
|
||||
const int N = (p->next_ == NULL) ? b->left_ : 0;
|
||||
int n = MAX_NUM_TOKEN;
|
||||
const token_t* const tokens = TOKEN_DATA(p);
|
||||
while (n-- > N) {
|
||||
const token_t token = tokens[n];
|
||||
if (!(token & FIXED_PROBA_BIT)) {
|
||||
Record((token >> 15) & 1, stats + (token & 0x3fffu));
|
||||
}
|
||||
}
|
||||
p = p->next_;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // 0
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Final coding pass, with known probabilities
|
||||
|
||||
|
@ -330,9 +330,6 @@ int VP8RecordCoeffTokens(int ctx, const struct VP8Residual* const res,
|
||||
// Estimate the final coded size given a set of 'probas'.
|
||||
size_t VP8EstimateTokenSize(VP8TBuffer* const b, const uint8_t* const probas);
|
||||
|
||||
// unused for now
|
||||
void VP8TokenToStats(const VP8TBuffer* const b, proba_t* const stats);
|
||||
|
||||
#endif // !DISABLE_TOKEN_BUFFER
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user