changeset 9297:493f6d65db83 libavcodec

Prettify some assignments
author reimar
date Tue, 31 Mar 2009 12:57:03 +0000
parents 2129ee5b7e0d
children 9698f0d03ed9
files interplayvideo.c
diffstat 1 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/interplayvideo.c	Tue Mar 31 12:44:35 2009 +0000
+++ b/interplayvideo.c	Tue Mar 31 12:57:03 2009 +0000
@@ -231,15 +231,15 @@
         for (y = 0; y < 8; y += 2) {
             for (x = 0; x < 8; x += 2, flags >>= 1) {
                 if (flags & 1) {
-                    *(s->pixel_ptr + x) = P1;
-                    *(s->pixel_ptr + x + 1) = P1;
-                    *(s->pixel_ptr + s->stride + x) = P1;
-                    *(s->pixel_ptr + s->stride + x + 1) = P1;
+                    s->pixel_ptr[x                ] =
+                    s->pixel_ptr[x + 1            ] =
+                    s->pixel_ptr[x +     s->stride] =
+                    s->pixel_ptr[x + 1 + s->stride] = P1;
                 } else {
-                    *(s->pixel_ptr + x) = P0;
-                    *(s->pixel_ptr + x + 1) = P0;
-                    *(s->pixel_ptr + s->stride + x) = P0;
-                    *(s->pixel_ptr + s->stride + x + 1) = P0;
+                    s->pixel_ptr[x                ] =
+                    s->pixel_ptr[x + 1            ] =
+                    s->pixel_ptr[x +     s->stride] =
+                    s->pixel_ptr[x + 1 + s->stride] = P0;
                 }
             }
             s->pixel_ptr += s->stride * 2;
@@ -433,10 +433,10 @@
         for (y = 0; y < 8; y += 2) {
             for (x = 0; x < 8; x += 2, flags >>= 2) {
                 pix = P[flags & 0x03];
-                *(s->pixel_ptr + x) = pix;
-                *(s->pixel_ptr + x + 1) = pix;
-                *(s->pixel_ptr + s->stride + x) = pix;
-                *(s->pixel_ptr + s->stride + x + 1) = pix;
+                s->pixel_ptr[x                ] =
+                s->pixel_ptr[x + 1            ] =
+                s->pixel_ptr[x +     s->stride] =
+                s->pixel_ptr[x + 1 + s->stride] = pix;
             }
             s->pixel_ptr += s->stride * 2;
         }
@@ -453,8 +453,8 @@
             }
             for (x = 0; x < 8; x += 2, flags >>= 2) {
                 pix = P[flags & 0x03];
-                *(s->pixel_ptr + x) = pix;
-                *(s->pixel_ptr + x + 1) = pix;
+                s->pixel_ptr[x    ] =
+                s->pixel_ptr[x + 1] = pix;
             }
             s->pixel_ptr += s->stride;
         }
@@ -471,8 +471,8 @@
             }
             for (x = 0; x < 8; x++, flags >>= 2) {
                 pix = P[flags & 0x03];
-                *(s->pixel_ptr + x) = pix;
-                *(s->pixel_ptr + s->stride + x) = pix;
+                s->pixel_ptr[x            ] =
+                s->pixel_ptr[x + s->stride] = pix;
             }
             s->pixel_ptr += s->stride * 2;
         }
@@ -607,10 +607,10 @@
     for (y = 0; y < 8; y += 2) {
         for (x = 0; x < 8; x += 2) {
             pix = *s->stream_ptr++;
-            *(s->pixel_ptr + x) = pix;
-            *(s->pixel_ptr + x + 1) = pix;
-            *(s->pixel_ptr + s->stride + x) = pix;
-            *(s->pixel_ptr + s->stride + x + 1) = pix;
+            s->pixel_ptr[x                ] =
+            s->pixel_ptr[x + 1            ] =
+            s->pixel_ptr[x +     s->stride] =
+            s->pixel_ptr[x + 1 + s->stride] = pix;
         }
         s->pixel_ptr += s->stride * 2;
     }