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
386#define G_shift 8386#define G_shift 8
387#define B_shift 0387#define B_shift 0
388 388
389static 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
399/* improved djb2 hash from http://www.cse.yorku.ca/~oz/hash.html */389/* improved djb2 hash from http://www.cse.yorku.ca/~oz/hash.html */
400static int djb2_hash(uint32_t key)390static int djb2_hash(uint32_t key)
401{391{
@@ -701,7 +691,7 @@ static int epic_decode_run_length(ePICContext *dc, int x, int y, int tile_width, · 299 unmodified lines
701 if (!(above_row[pos] == pix))691 if (!(above_row[pos] == pix))
702 break;692 break;
703 run = pos - start_pos - 1;693 run = pos - start_pos - 1;
704 idx = log2_ceil(run);694 idx = av_ceil_log2(run);
705 if (ff_els_decode_bit(&dc->els_ctx, &dc->prev_row_rung[idx]))695 if (ff_els_decode_bit(&dc->els_ctx, &dc->prev_row_rung[idx]))
706 *pRun += run;696 *pRun += run;
707 else {697 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