summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_common.h
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-06-27 14:55:18 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-06-27 14:55:18 -0700
commitbe83ef3104311fd507108e93a07b75f08d937e46 (patch)
tree7ab31531e1aa479a6caf8915877ebe3478e00b53 /vp9/common/vp9_common.h
parent7a049be6bf8273be4871555520f6bbbfb0a1cb4f (diff)
parent94675717773c347f9d4a7329365ff3ee1645950e (diff)
downloadlibvpx-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.h12
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