diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-04-17 18:50:31 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-04-17 18:50:31 +0000 |
commit | 8431603a5196551946499f131592305b2366b95b (patch) | |
tree | 8d44c7fab3b86ad914f00a532cacb8e3491cf9fb | |
parent | f1ae14d20d6b25ed8e1c2b8882b99df71ad84b1a (diff) | |
download | ffmpeg-8431603a5196551946499f131592305b2366b95b.tar.gz |
Remove wrapper around av_log2()
Originally committed as revision 12881 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/alac.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c index d14b391087..5ff77a8f76 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -140,12 +140,6 @@ static int alac_set_info(ALACContext *alac) return 0; } -static inline int count_leading_zeros(int32_t input) -{ - return 31-av_log2(input); -} - - static inline int decode_scalar(GetBitContext *gb, int k, int limit, int readsamplesize){ /* read x - number of 1s before 0 represent the rice */ int x = get_unary_0_9(gb); @@ -196,7 +190,7 @@ static void bastardized_rice_decompress(ALACContext *alac, int k; /* size of extra bits */ /* read k, that is bits as is */ - k = 31 - count_leading_zeros((history >> 9) + 3); + k = av_log2((history >> 9) + 3); x= decode_scalar(&alac->gb, k, rice_kmodifier, readsamplesize); x_modified = sign_modifier + x; @@ -220,7 +214,7 @@ static void bastardized_rice_decompress(ALACContext *alac, sign_modifier = 1; - k = count_leading_zeros(history) + ((history + 16) >> 6 /* / 64 */) - 24; + k = 7 - av_log2(history) + ((history + 16) >> 6 /* / 64 */); block_size= decode_scalar(&alac->gb, k, rice_kmodifier, 16); |