Commit be1b4167 authored by Aℓex Converse's avatar Aℓex Converse Committed by Gerrit Code Review
Browse files

Merge "INLINE and reimplement get_unsigned_bits()."

parents 282f36ad ffd3d483
Branches
Tags
No related merge requests found
Showing with 3 additions and 10 deletions
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "./vpx_config.h" #include "./vpx_config.h"
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
#include "vpx/vpx_integer.h" #include "vpx/vpx_integer.h"
#include "vp9/common/vp9_systemdependent.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -59,16 +60,8 @@ static INLINE double fclamp(double value, double low, double high) { ...@@ -59,16 +60,8 @@ static INLINE double fclamp(double value, double low, double high) {
return value < low ? low : (value > high ? high : value); return value < low ? low : (value > high ? high : value);
} }
static int get_unsigned_bits(unsigned int num_values) { static INLINE int get_unsigned_bits(unsigned int num_values) {
int cat = 0; return num_values > 0 ? get_msb(num_values) + 1 : 0;
if (num_values <= 1)
return 0;
num_values--;
while (num_values > 0) {
cat++;
num_values >>= 1;
}
return cat;
} }
#if CONFIG_DEBUG #if CONFIG_DEBUG
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment