mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
[libvpx] Update to v1.8.1 from https://chromium.googlesource.com/webm/libvpx
This commit is contained in:
committed by
Andrey Volk
parent
34fcadbd53
commit
ceb051af4e
@@ -12,6 +12,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "vp8/common/treecoder.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
static void tree2tok(struct vp8_token_struct *const p, vp8_tree t, int i, int v,
|
||||
int L) {
|
||||
@@ -79,7 +80,7 @@ void vp8_tree_probs_from_distribution(int n, /* n = size of alphabet */
|
||||
vp8_prob probs[/* n-1 */],
|
||||
unsigned int branch_ct[/* n-1 */][2],
|
||||
const unsigned int num_events[/* n */],
|
||||
unsigned int Pfac, int rd) {
|
||||
unsigned int Pfactor, int Round) {
|
||||
const int tree_len = n - 1;
|
||||
int t = 0;
|
||||
|
||||
@@ -89,10 +90,10 @@ void vp8_tree_probs_from_distribution(int n, /* n = size of alphabet */
|
||||
const unsigned int *const c = branch_ct[t];
|
||||
const unsigned int tot = c[0] + c[1];
|
||||
|
||||
assert(tot < (1 << 24)); /* no overflow below */
|
||||
|
||||
if (tot) {
|
||||
const unsigned int p = ((c[0] * Pfac) + (rd ? tot >> 1 : 0)) / tot;
|
||||
const unsigned int p =
|
||||
(unsigned int)(((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;
|
||||
|
Reference in New Issue
Block a user