/* * Copyright (c) 2010 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
staticvoid branch_counts(int n, /* n = size of alphabet */
vp8_token tok[/* n */], vp8_tree tree, unsignedint branch_ct[/* n-1 */][2], constunsignedint num_events[/* n */]) { constint tree_len = n - 1; int t = 0;
assert(tree_len);
do {
branch_ct[t][0] = branch_ct[t][1] = 0;
} while (++t < tree_len);
t = 0;
do { int L = tok[t].Len; constint enc = tok[t].value; constunsignedint ct = num_events[t];
vp8_tree_index i = 0;
do { constint b = (enc >> --L) & 1; constint j = i >> 1;
assert(j < tree_len && 0 <= L);
branch_ct[j][b] += ct;
i = tree[i + b];
} while (i > 0);
assert(!L);
} while (++t < n);
}
void vp8_tree_probs_from_distribution(int n, /* n = size of alphabet */
vp8_token tok[/* n */], vp8_tree tree,
vp8_prob probs[/* n-1 */], unsignedint branch_ct[/* n-1 */][2], constunsignedint num_events[/* n */], unsignedint Pfactor, int Round) { constint tree_len = n - 1; int t = 0;
do { constunsignedint *const c = branch_ct[t]; constunsignedint tot = c[0] + c[1];
if (tot) { constunsignedint p =
(unsignedint)(((uint64_t)c[0] * Pfactor) + (Round ? tot >> 1 : 0)) /
tot;
probs[t] = p < 256 ? (p ? p : 1) : 255; /* agree w/old version for now */
} else {
probs[t] = vp8_prob_half;
}
} while (++t < tree_len);
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-06-07)
¤