diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-17 19:56:50 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-17 19:56:50 +0000 |
commit | 977d813447a023b508e148b990445756faf3e393 (patch) | |
tree | b1c2b84642f864aaecdb9fcfbbabddb98647b499 /libavcodec | |
parent | b1e309865f6b4f67841c811faa5022e492095906 (diff) | |
download | ffmpeg-977d813447a023b508e148b990445756faf3e393.tar.gz |
Use / and % operators instead of reimplementing them with a loop.
Originally committed as revision 18597 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/xan.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c index b5303eb38b..4152ff4540 100644 --- a/libavcodec/xan.c +++ b/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; } } |