summaryrefslogtreecommitdiffstats
path: root/libFLAC/bitmath.c
diff options
context:
space:
mode:
authorRobert Shih <robertshih@google.com>2015-01-05 17:35:54 -0800
committerRobert Shih <robertshih@google.com>2015-01-06 15:13:52 -0800
commit31e4f3166a91a2ebb34f643787122a638d9f1471 (patch)
tree0bdb8de4408e53205807126df684051da7c31fa8 /libFLAC/bitmath.c
parent457fe12432caac0de0e430bb976dab681b3ae1a2 (diff)
downloadandroid_external_flac-31e4f3166a91a2ebb34f643787122a638d9f1471.tar.gz
android_external_flac-31e4f3166a91a2ebb34f643787122a638d9f1471.tar.bz2
android_external_flac-31e4f3166a91a2ebb34f643787122a638d9f1471.zip
libFLAC: merge master from Xiph
remote: https://git.xiph.org/flac.git commit: 775eb93 Bug: 18872897 Bug: 18910747 Change-Id: I6e450e44c96b97c3323e428b9e6d420422f24a4e
Diffstat (limited to 'libFLAC/bitmath.c')
-rw-r--r--libFLAC/bitmath.c46
1 files changed, 3 insertions, 43 deletions
diff --git a/libFLAC/bitmath.c b/libFLAC/bitmath.c
index 27e25f0..5b58ca9 100644
--- a/libFLAC/bitmath.c
+++ b/libFLAC/bitmath.c
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
- * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson
+ * Copyright (C) 2001-2009 Josh Coalson
+ * Copyright (C) 2011-2014 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,52 +30,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "private/bitmath.h"
-#include "FLAC/assert.h"
-
-/* An example of what FLAC__bitmath_ilog2() computes:
- *
- * ilog2( 0) = assertion failure
- * ilog2( 1) = 0
- * ilog2( 2) = 1
- * ilog2( 3) = 1
- * ilog2( 4) = 2
- * ilog2( 5) = 2
- * ilog2( 6) = 2
- * ilog2( 7) = 2
- * ilog2( 8) = 3
- * ilog2( 9) = 3
- * ilog2(10) = 3
- * ilog2(11) = 3
- * ilog2(12) = 3
- * ilog2(13) = 3
- * ilog2(14) = 3
- * ilog2(15) = 3
- * ilog2(16) = 4
- * ilog2(17) = 4
- * ilog2(18) = 4
- */
-unsigned FLAC__bitmath_ilog2(FLAC__uint32 v)
-{
- unsigned l = 0;
- FLAC__ASSERT(v > 0);
- while(v >>= 1)
- l++;
- return l;
-}
-
-unsigned FLAC__bitmath_ilog2_wide(FLAC__uint64 v)
-{
- unsigned l = 0;
- FLAC__ASSERT(v > 0);
- while(v >>= 1)
- l++;
- return l;
-}
/* An example of what FLAC__bitmath_silog2() computes:
*