mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-09 08:47:31 +09:00
Update aom to commit id f5bdeac22930ff4c6b219be49c843db35970b918
This commit is contained in:
parent
e329bc4331
commit
2ab8fcbfd1
370 changed files with 56185 additions and 32026 deletions
18
third_party/aom/av1/encoder/cost.c
vendored
18
third_party/aom/av1/encoder/cost.c
vendored
|
|
@ -65,3 +65,21 @@ void av1_cost_tokens_skip(int *costs, const aom_prob *probs, aom_tree tree) {
|
|||
costs[-tree[0]] = av1_cost_bit(probs[0], 0);
|
||||
cost(costs, tree, probs, 2, 0);
|
||||
}
|
||||
|
||||
void av1_cost_tokens_from_cdf(int *costs, const aom_cdf_prob *cdf,
|
||||
const int *inv_map) {
|
||||
int i;
|
||||
aom_cdf_prob prev_cdf = 0;
|
||||
for (i = 0;; ++i) {
|
||||
const aom_cdf_prob p15 = AOM_ICDF(cdf[i]) - prev_cdf;
|
||||
prev_cdf = AOM_ICDF(cdf[i]);
|
||||
|
||||
if (inv_map)
|
||||
costs[inv_map[i]] = av1_cost_symbol(p15);
|
||||
else
|
||||
costs[i] = av1_cost_symbol(p15);
|
||||
|
||||
// Stop once we reach the end of the CDF
|
||||
if (cdf[i] == AOM_ICDF(CDF_PROB_TOP)) break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue