diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2013-06-27 14:55:18 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-06-27 14:55:18 -0700 |
commit | be83ef3104311fd507108e93a07b75f08d937e46 (patch) | |
tree | 7ab31531e1aa479a6caf8915877ebe3478e00b53 /vp9/common/vp9_common.h | |
parent | 7a049be6bf8273be4871555520f6bbbfb0a1cb4f (diff) | |
parent | 94675717773c347f9d4a7329365ff3ee1645950e (diff) | |
download | libvpx-be83ef3104311fd507108e93a07b75f08d937e46.tar libvpx-be83ef3104311fd507108e93a07b75f08d937e46.tar.gz libvpx-be83ef3104311fd507108e93a07b75f08d937e46.tar.bz2 libvpx-be83ef3104311fd507108e93a07b75f08d937e46.zip |
Merge "Moving subexp encoding functions in separate vp9_dsubexp.c file."
Diffstat (limited to 'vp9/common/vp9_common.h')
-rw-r--r-- | vp9/common/vp9_common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vp9/common/vp9_common.h b/vp9/common/vp9_common.h index 0d7babf97..9a14ab149 100644 --- a/vp9/common/vp9_common.h +++ b/vp9/common/vp9_common.h @@ -60,6 +60,18 @@ static INLINE int multiple8(int value) { return (value + 7) & ~7; } +static int get_unsigned_bits(unsigned int num_values) { + int cat = 0; + if (num_values <= 1) + return 0; + num_values--; + while (num_values > 0) { + cat++; + num_values >>= 1; + } + return cat; +} + #define SYNC_CODE_0 0x49 #define SYNC_CODE_1 0x83 #define SYNC_CODE_2 0x42 |