History

g2meet: use av_ceil_log2 instead of a custom function

Janne Grunau committed 11 years ago

Commit 9eec23b1 parent 4ccccd61 file · +1 −11Browse files

Unified · Split

libavcodec/g2meet.c+1−11
@@ -386,16 +386,6 @@ static int jpg_decode_data(JPGContext *c, int width, int height, · 385 unmodified lines
386386 #define G_shift 8
387387 #define B_shift 0
388388
389−static inline int log2_ceil(uint32_t x)
390−{
391− int c = 0;
392−
393− for (--x; x > 0; x >>= 1)
394− c++;
395−
396− return c;
397−}
398−
399389 /* improved djb2 hash from http://www.cse.yorku.ca/~oz/hash.html */
400390 static int djb2_hash(uint32_t key)
401391 {
@@ -701,7 +691,7 @@ static int epic_decode_run_length(ePICContext *dc, int x, int y, int tile_width, · 299 unmodified lines
701691 if (!(above_row[pos] == pix))
702692 break;
703693 run = pos - start_pos - 1;
704− idx = log2_ceil(run);
694+ idx = av_ceil_log2(run);
705695 if (ff_els_decode_bit(&dc->els_ctx, &dc->prev_row_rung[idx]))
706696 *pRun += run;
707697 else {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t