summaryrefslogtreecommitdiff
path: root/libavcodec/g2meet.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2015-07-01 13:58:34 +0200
committerJanne Grunau <janne-libav@jannau.net>2015-07-01 13:58:34 +0200
commit9eec23b8a7fd0f91827bbc3ed0792c39a8cc9a8a (patch)
tree245c0be6398e2909d32efe21bdbf855c6f22275e /libavcodec/g2meet.c
parent4ccccd6c40a6d0ce85e96a6e37f558236e2a6a75 (diff)
g2meet: use av_ceil_log2 instead of a custom function
Diffstat (limited to 'libavcodec/g2meet.c')
-rw-r--r--libavcodec/g2meet.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 600e2b23ce..af27a5da83 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -386,16 +386,6 @@ static int jpg_decode_data(JPGContext *c, int width, int height,
#define G_shift 8
#define B_shift 0
-static inline int log2_ceil(uint32_t x)
-{
- int c = 0;
-
- for (--x; x > 0; x >>= 1)
- c++;
-
- return c;
-}
-
/* improved djb2 hash from http://www.cse.yorku.ca/~oz/hash.html */
static int djb2_hash(uint32_t key)
{
@@ -701,7 +691,7 @@ static int epic_decode_run_length(ePICContext *dc, int x, int y, int tile_width,
if (!(above_row[pos] == pix))
break;
run = pos - start_pos - 1;
- idx = log2_ceil(run);
+ idx = av_ceil_log2(run);
if (ff_els_decode_bit(&dc->els_ctx, &dc->prev_row_rung[idx]))
*pRun += run;
else {