git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1e3098
)
Use / and % operators instead of reimplementing them with a loop.
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Fri, 17 Apr 2009 19:56:50 +0000
(19:56 +0000)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Fri, 17 Apr 2009 19:56:50 +0000
(19:56 +0000)
Originally committed as revision 18597 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/xan.c
patch
|
blob
|
history
diff --git
a/libavcodec/xan.c
b/libavcodec/xan.c
index
b5303eb
..
4152ff4
100644
(file)
--- 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;
}
}