Mercurial > libavcodec.hg
comparison xan.c @ 9498:6abd94fdd827 libavcodec
Use / and % operators instead of reimplementing them with a loop.
author | reimar |
---|---|
date | Fri, 17 Apr 2009 19:56:50 +0000 |
parents | cb387dff812d |
children | 7075d0be5ec4 |
comparison
equal
deleted
inserted
replaced
9497:cb387dff812d | 9498:6abd94fdd827 |
---|---|
349 flag = 0; | 349 flag = 0; |
350 } | 350 } |
351 | 351 |
352 /* coordinate accounting */ | 352 /* coordinate accounting */ |
353 total_pixels -= size; | 353 total_pixels -= size; |
354 while (size) { | 354 y += (x + size) / width; |
355 if (x + size >= width) { | 355 x = (x + size) % width; |
356 y++; | |
357 size -= (width - x); | |
358 x = 0; | |
359 } else { | |
360 x += size; | |
361 size = 0; | |
362 } | |
363 } | |
364 } | 356 } |
365 } | 357 } |
366 | 358 |
367 static void xan_wc4_decode_frame(XanContext *s) { | 359 static void xan_wc4_decode_frame(XanContext *s) { |
368 } | 360 } |