[FFmpeg-cvslog] sanm: replace conditions in for loops with more common version

Paul B Mahol git at videolan.org
Thu Jul 5 01:42:21 CEST 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Jul  4 17:37:31 2012 +0000| [3b9dd906d18f4cd801ceedd20d800a7e53074be9] | committer: Paul B Mahol

sanm: replace conditions in for loops with more common version

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b9dd906d18f4cd801ceedd20d800a7e53074be9
---

 libavcodec/sanm.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index f5de6a2..3a73416 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -772,7 +772,7 @@ static void copy_block(uint16_t *pdest, uint16_t *psrc, int block_size, int pitc
 {
     int y;
 
-    for (y = 0; y != block_size; y++, pdest += pitch, psrc += pitch)
+    for (y = 0; y < block_size; y++, pdest += pitch, psrc += pitch)
         memcpy(pdest, psrc, block_size * sizeof(pdest[0]));
 }
 
@@ -781,8 +781,8 @@ static void fill_block(uint16_t *pdest, uint16_t color, int block_size, int pitc
     int x, y;
 
     pitch -= block_size;
-    for (y = 0; y != block_size; y++, pdest += pitch)
-        for (x = 0; x != block_size; x++)
+    for (y = 0; y < block_size; y++, pdest += pitch)
+        for (x = 0; x < block_size; x++)
             *pdest++ = color;
 }
 
@@ -972,8 +972,8 @@ static int decode_2(SANMVideoContext *ctx)
 {
     int cx, cy, ret;
 
-    for (cy = 0; cy != ctx->aligned_height; cy += 8) {
-        for (cx = 0; cx != ctx->aligned_width; cx += 8) {
+    for (cy = 0; cy < ctx->aligned_height; cy += 8) {
+        for (cx = 0; cx < ctx->aligned_width; cx += 8) {
             if (ret = codec2subblock(ctx, cx, cy, 8))
                 return ret;
         }



More information about the ffmpeg-cvslog mailing list