# HG changeset patch # User vitor # Date 1208458231 0 # Node ID 4aa644a885007a1d3aa81499618837890078d242 # Parent 76a252cc9ba33d286045ee24300af79c9f3f0e49 Remove wrapper around av_log2() diff -r 76a252cc9ba3 -r 4aa644a88500 alac.c --- a/alac.c Thu Apr 17 15:41:25 2008 +0000 +++ b/alac.c Thu Apr 17 18:50:31 2008 +0000 @@ -140,12 +140,6 @@ 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 @@ 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 @@ 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);