Unified · Split
| @@ -386,16 +386,6 @@ static int jpg_decode_data(JPGContext *c, int width, int height, · 385 unmodified lines | ||
| 386 | 386 | #define G_shift 8 |
| 387 | 387 | #define B_shift 0 |
| 388 | 388 | |
| 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 | − | |
| 399 | 389 | /* improved djb2 hash from http://www.cse.yorku.ca/~oz/hash.html */ |
| 400 | 390 | static 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 | 691 | if (!(above_row[pos] == pix)) |
| 702 | 692 | break; |
| 703 | 693 | run = pos - start_pos - 1; |
| 704 | − idx = log2_ceil(run); | |
| 694 | + idx = av_ceil_log2(run); | |
| 705 | 695 | if (ff_els_decode_bit(&dc->els_ctx, &dc->prev_row_rung[idx])) |
| 706 | 696 | *pRun += run; |
| 707 | 697 | else { |