commit 221b3d2981d8ae15b73e925619ee7082bb23fc6f
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Fri Jan 20 11:24:04 2017 +0100
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Fri Jan 20 11:33:23 2017 +0100
blind-extend: less brackets
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/TODO b/TODO
index f689e7b..22c7b09 100644
--- a/TODO
+++ b/TODO
_AT_@ -14,5 +14,4 @@ Add [-j jobs] to blind-from-video and blind-to-video.
UNTESTED:
blind-cut
- blind-extend
blind-rewrite-head
diff --git a/src/blind-extend.c b/src/blind-extend.c
index 71be7f0..4331ae3 100644
--- a/src/blind-extend.c
+++ b/src/blind-extend.c
_AT_@ -77,8 +77,8 @@ main(int argc, char *argv[])
right *= stream.pixel_size;
rown = stream.width * stream.pixel_size;
- xoff = (rown - (left % rown)) % rown;
- yoff = (stream.height - (top % stream.height)) % stream.height;
+ xoff = (rown - left % rown) % rown;
+ yoff = (stream.height - top % stream.height) % stream.height;
memcpy(buf, stream.buf, ptr = stream.ptr);
while (eread_frame(&stream, buf, n)) {
_AT_@ -88,11 +88,11 @@ main(int argc, char *argv[])
} else {
for (y = 0; y < stream.height; y++)
for (x = 0; x < imgw; x++)
- image[x + (y + top) * imgw] = buf[((x + xoff) % rown) + y * rown];
+ image[x + (y + top) * imgw] = buf[(x + xoff) % rown + y * rown];
for (y = 0; y < top; y++)
- memcpy(image + y * imgw, image + (((y + yoff) % stream.height) + top) * imgw, imgw);
+ memcpy(image + y * imgw, image + ((y + yoff) % stream.height + top) * imgw, imgw);
for (y = top + stream.height; y < h; y++)
- memcpy(image + y * imgw, image + (((y + yoff) % stream.height) + top) * imgw, imgw);
+ memcpy(image + y * imgw, image + ((y + yoff) % stream.height + top) * imgw, imgw);
}
ewriteall(STDOUT_FILENO, image, m, "<stdout>");
}
Received on Fri Jan 20 2017 - 11:45:20 CET
This archive was generated by hypermail 2.3.0
: Fri Jan 20 2017 - 11:48:22 CET