History

ape: Use unsigned integer maths

This involves a division that should be a shift.

Christophe Gisquet committed 14 years ago

Commit 706b9981 parent cbc7d601 file · +2 −2Browse files

Unified · Split

libavcodec/apedec.c+2−2
@@ -393,7 +393,7 @@ static inline int range_get_symbol(APEContext *ctx, · 392 unmodified lines
393393 }
394394 /** @} */ // group rangecoder
395395
396−static inline void update_rice(APERice *rice, int x)
396+static inline void update_rice(APERice *rice, unsigned int x)
397397 {
398398 int lim = rice->k ? (1 << (rice->k + 4)) : 0;
399399 rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
@@ -406,7 +406,7 @@ static inline void update_rice(APERice *rice, int x) · 6 unmodified lines
406406
407407 static inline int ape_decode_value(APEContext *ctx, APERice *rice)
408408 {
409− int x, overflow;
409+ unsigned int x, overflow;
410410
411411 if (ctx->fileversion < 3990) {
412412 int tmpk;

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