Use / and % operators instead of reimplementing them with a loop.

Originally committed as revision 18597 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Reimar Döffinger 16 years ago
parent b1e309865f
commit 977d813447
  1. 12
      libavcodec/xan.c

@ -351,16 +351,8 @@ static void xan_wc3_decode_frame(XanContext *s) {
/* coordinate accounting */
total_pixels -= size;
while (size) {
if (x + size >= width) {
y++;
size -= (width - x);
x = 0;
} else {
x += size;
size = 0;
}
}
y += (x + size) / width;
x = (x + size) % width;
}
}

Loading…
Cancel
Save