(wrong string) ée

From: <git_AT_suckless.org>
Date: Fri, 2 Jun 2017 22:32:22 +0200 (CEST)

commit c295bcecda2cdf04b28c1b4767e05e815b41a04e
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Fri Jun 2 22:31:08 2017 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Fri Jun 2 22:31:08 2017 +0200

    Fix blind-cat-cols and blind-cat-rows cmdline and document blind-disperse, blind-interleave, blind-split-cols, and blind-split-rows
    
    Signed-off-by: Mattias Andrée <maandree_AT_kth.se>

diff --git a/README b/README
index 0f89fa7..eb2d574 100644
--- a/README
+++ b/README
_AT_@ -15,6 +15,12 @@ UTILITIES
        blind-arithm(1)
               Perform simple arithmetic on a video
 
+ blind-cat-cols(1)
+ Place videos side by side
+
+ blind-cat-rows(1)
+ Stack videos vertically
+
        blind-colour-ciexyz(1)
               Convert CIE XYZ for use with blind-single-colour(1)
 
_AT_@ -36,6 +42,9 @@ UTILITIES
        blind-dissolve(1)
               Fade a video by chaning it's alpha channel
 
+ blind-disperse(1)
+ Framewise split a video into multiple videos
+
        blind-extend(1)
               Add margins to a video
 
_AT_@ -63,6 +72,9 @@ UTILITIES
        blind-gauss-blur(1)
               Apply Gaussian blur to a video
 
+ blind-interleave(1)
+ Framewise interleave videos
+
        blind-invert-luma(1)
               Invert the luminosity of a video
 
_AT_@ -111,6 +123,12 @@ UTILITIES
        blind-split(1)
               Split a video, by frame, into multiple videos
 
+ blind-split-cols(1)
+ Split a video vertically into multiple videos
+
+ blind-split-rows(1)
+ Split a video horizontally into multiple videos
+
        blind-stack(1)
               Overlay videos
 
diff --git a/TODO b/TODO
index 943f19a..5c4461b 100644
--- a/TODO
+++ b/TODO
_AT_@ -1,9 +1,4 @@
 Write manpages for:
- blind-interleave framewise interleave videos
- blind-disperse inverse of blind-interleave
- Useful for processing a video on multiple computers
- blind-split-rows split stream into multiple streams by splitting video horizontally
- blind-split-cols split stream into multiple streams by splitting video vertically
         blind-cat-rows merge video by vertically stacking streams (inverse of blind-split-rows)
         blind-cat-cols merge video by putting streams beside each other (inverse of blind-split-cols)
 
diff --git a/man/blind-concat.1 b/man/blind-concat.1
index 5d1a000..fb9fad2 100644
--- a/man/blind-concat.1
+++ b/man/blind-concat.1
_AT_@ -40,7 +40,10 @@ processes are rendering.
 .SH SEE ALSO
 .BR blind (7),
 .BR blind-to-video (1),
-.BR blind-split (1)
+.BR blind-split (1),
+.BR blind-interleave (1),
+.BR blind-cat-rows (1),
+.BR blind-cat-cols (1)
 .SH AUTHORS
 Mattias Andrée
 .RI < maandree_AT_kth.se >
diff --git a/man/blind-cut.1 b/man/blind-cut.1
index 5065578..b79a73f 100644
--- a/man/blind-cut.1
+++ b/man/blind-cut.1
_AT_@ -29,7 +29,10 @@ is specified instead of
 .BR blind (7),
 .BR blind-from-video (1),
 .BR blind-split (1),
-.BR blind-concat (1)
+.BR blind-concat (1),
+.BR blind-disperse (1),
+.BR blind-split-cols (1),
+.BR blind-split-rows (1)
 .SH AUTHORS
 Mattias Andrée
 .RI < maandree_AT_kth.se >
diff --git a/man/blind-disperse.1 b/man/blind-disperse.1
new file mode 100644
index 0000000..279613e
--- /dev/null
+++ b/man/blind-disperse.1
_AT_@ -0,0 +1,36 @@
+.TH BLIND-DISPERSE 1 blind
+.SH NAME
+blind-disperse - Framewise split a video into multiple videos
+.SH SYNOPSIS
+.B blind-disperse
+.RI ( file
+.IR frames )\ ...
+.SH DESCRIPTION
+.B blind-disperse
+reads a video from stdin and splits into multiple videos.
+Starting from the first frame in stdin, it writes a video
+to the first specified
+.I file
+until the first specified number of
+.I frames
+have been written.
+.B blind-disperse
+then proceeds to do to the same for the next pair of
+.I file
+and
+.I frames
+until, and in including, the last pair. This process
+is repeated until the last frame in stdin has been read.
+.SH RATIONALE
+This is useful processing a video on multiple computers.
+.SH SEE ALSO
+.BR blind (7),
+.BR blind-interleave (1),
+.BR blind-cut (1),
+.BR blind-split (1),
+.BR blind-split-cols (1),
+.BR blind-split-rows (1),
+.BR blind-skip-pattern (1)
+.SH AUTHORS
+Mattias Andrée
+.RI < maandree_AT_kth.se >
diff --git a/man/blind-interleave.1 b/man/blind-interleave.1
new file mode 100644
index 0000000..38687a2
--- /dev/null
+++ b/man/blind-interleave.1
_AT_@ -0,0 +1,31 @@
+.TH BLIND-INTERLEAVE 1 blind
+.SH NAME
+blind-interleave - Framewise interleave videos
+.SH SYNOPSIS
+.B blind-interleave
+.RI ( file
+.IR frames )\ ...
+.SH DESCRIPTION
+.BR blind-interleave ,
+for each specified pair of
+.I file
+and
+.IR frames ,
+in order, reads
+.I frames
+frames from
+.R file
+and writes the read frames to stdout.
+This process is repeated until the number of specified
+.I frames
+cannot be read from a
+.IR file .
+.SH SEE ALSO
+.BR blind (7),
+.BR blind-disperse (1),
+.BR blind-concat (1),
+.BR blind-cat-cols (1),
+.BR blind-cat-rows (1),
+.SH AUTHORS
+Mattias Andrée
+.RI < maandree_AT_kth.se >
diff --git a/man/blind-split-cols.1 b/man/blind-split-cols.1
new file mode 100644
index 0000000..9229697
--- /dev/null
+++ b/man/blind-split-cols.1
_AT_@ -0,0 +1,38 @@
+.TH BLIND-SPLIT-COLS 1 blind
+.SH NAME
+blind-split-cols - Split a video horizontally into multiple videos
+.SH SYNOPSIS
+.B blind-split-cols
+.RI ( file
+.IR columns )\ ...
+.SH DESCRIPTION
+.B blind-split-cols
+reads a video from stdin and splits into multiple videos.
+Starting from the first column in stdin, it writes a video
+to the first specified
+.I file
+until the first specified number of
+.I columns
+have been written.
+.B blind-split-cols
+then proceeds to do to the same for the next pair of
+.I file
+and
+.I columns
+until, and in including, the last pair. This process
+is repeated until the last column in stdin has been read.
+(In this context a column is technically defined as a segment of a row.)
+.P
+The sum of all
+.I columns
+must add up exactly to the width of the input video.
+.SH SEE ALSO
+.BR blind (7),
+.BR blind-cat-cols (1),
+.BR blind-cut (1),
+.BR blind-split (1),
+.BR blind-disperse (1),
+.BR blind-split-rows (1)
+.SH AUTHORS
+Mattias Andrée
+.RI < maandree_AT_kth.se >
diff --git a/man/blind-split-rows.1 b/man/blind-split-rows.1
new file mode 100644
index 0000000..96e6247
--- /dev/null
+++ b/man/blind-split-rows.1
_AT_@ -0,0 +1,37 @@
+.TH BLIND-SPLIT-ROWS 1 blind
+.SH NAME
+blind-split-rows - Split a video horizontally into multiple videos
+.SH SYNOPSIS
+.B blind-split-rows
+.RI ( file
+.IR rows )\ ...
+.SH DESCRIPTION
+.B blind-split-rows
+reads a video from stdin and splits into multiple videos.
+Starting from the first row in stdin, it writes a video
+to the first specified
+.I file
+until the first specified number of
+.I rows
+have been written.
+.B blind-split-rows
+then proceeds to do to the same for the next pair of
+.I file
+and
+.I rows
+until, and in including, the last pair. This process
+is repeated until the last row in stdin has been read.
+.P
+The sum of all
+.I rows
+must add up exactly to the height of the input video.
+.SH SEE ALSO
+.BR blind (7),
+.BR blind-cat-rows (1),
+.BR blind-cut (1),
+.BR blind-split (1),
+.BR blind-disperse (1),
+.BR blind-split-cols (1)
+.SH AUTHORS
+Mattias Andrée
+.RI < maandree_AT_kth.se >
diff --git a/man/blind-split.1 b/man/blind-split.1
index c27d01f..99fac75 100644
--- a/man/blind-split.1
+++ b/man/blind-split.1
_AT_@ -11,14 +11,14 @@ blind-split - Split a video, by frame, into multiple videos
 .SH DESCRIPTION
 .B blind-split
 reads a video from stdin and splits into multiple videos.
-Starting from the first frame in stdin, it write a video
+Starting from the first frame in stdin, it writes a video
 to the first specified
 .I file
 until the first specified
 .I end-point
 number of frames have been written.
 .B blind-split
-the proceeds to write the following frames to the next
+then proceeds to write the following frames to the next
 specified
 .B file
 until a total of
_AT_@ -85,6 +85,9 @@ rewrite its head with
 .BR blind-to-video (1),
 .BR blind-cut (1),
 .BR blind-concat (1),
+.BR blind-disperse (1),
+.BR blind-split-cols (1),
+.BR blind-split-rows (1),
 .BR blind-rewrite-head (1)
 .SH AUTHORS
 Mattias Andrée
diff --git a/man/blind.7 b/man/blind.7
index 75f244a..b811440 100644
--- a/man/blind.7
+++ b/man/blind.7
_AT_@ -22,6 +22,12 @@ first convert it with
 .BR blind-arithm (1)
 Perform simple arithmetic on a video
 .TP
+.BR blind-cat-cols (1)
+Place videos side by side
+.TP
+.BR blind-cat-rows (1)
+Stack videos vertically
+.TP
 .BR blind-colour-ciexyz (1)
 Convert CIE XYZ for use with blind-single-colour(1)
 .TP
_AT_@ -49,6 +55,9 @@ Decompress a video compressed by blind-compress(1)
 .BR blind-dissolve (1)
 Fade a video by chaning it's alpha channel
 .TP
+.BR blind-disperse (1)
+Framewise split a video into multiple videos
+.TP
 .BR blind-extend (1)
 Add margins to a video
 .TP
_AT_@ -76,6 +85,9 @@ Converts a regular, cooked video to a blind video
 .BR blind-gauss-blur (1)
 Apply Gaussian blur to a video
 .TP
+.BR blind-interleave (1)
+Framewise interleave videos
+.TP
 .BR blind-invert-luma (1)
 Invert the luminosity of a video
 .TP
_AT_@ -124,6 +136,12 @@ Skips frames in a video according to pattern
 .BR blind-split (1)
 Split a video, by frame, into multiple videos
 .TP
+.BR blind-split-cols (1)
+Split a video vertically into multiple videos
+.TP
+.BR blind-split-rows (1)
+Split a video horizontally into multiple videos
+.TP
 .BR blind-stack (1)
 Overlay videos
 .TP
diff --git a/src/blind-cat-cols.c b/src/blind-cat-cols.c
index e20e913..ef7d15e 100644
--- a/src/blind-cat-cols.c
+++ b/src/blind-cat-cols.c
_AT_@ -1,26 +1,25 @@
 /* See LICENSE file for copyright and license details. */
 #include "common.h"
 
-USAGE("(file columns) ...")
+USAGE("file ...")
 
 int
 main(int argc, char *argv[])
 {
         struct stream *streams;
- size_t parts, width = 0, *cols, i;
+ size_t width = 0, *cols;
+ int i;
 
- UNOFLAGS(argc % 2 || !argc);
+ UNOFLAGS(!argc);
 
- parts = (size_t)argc / 2;
- streams = emalloc2(parts, sizeof(*streams));
- cols = alloca(parts * sizeof(*cols));
+ streams = emalloc2((size_t)argc, sizeof(*streams));
+ cols = alloca((size_t)argc * sizeof(*cols));
 
- for (i = 0; i < parts; i++) {
- eopen_stream(streams + i, argv[i * 2]);
- cols[i] = etozu_arg("columns", argv[i * 2 + 1], 1, SIZE_MAX);
+ for (i = 0; i < argc; i++) {
+ eopen_stream(streams + i, argv[i]);
                 if (streams[i].width > SIZE_MAX - width)
                         eprintf("output video is too tall\n");
- width += streams[i].width;
+ width += cols[i] = streams[i].width;
                 if (i) {
                         streams[i].width = streams->width;
                         echeck_compat(streams, streams + i);
_AT_@ -31,10 +30,10 @@ main(int argc, char *argv[])
         fprint_stream_head(stdout, streams);
         efflush(stdout, "<stdout>");
 
- for (i = 0; i < parts; i++, i = i == parts ? 0 : i)
+ for (i = 0; i < argc; i++, i = i == argc ? 0 : i)
                 if (esend_pixels(streams + i, STDOUT_FILENO, cols[i], "<stdout>") != cols[i])
                         break;
- for (i = 0; i < parts; i++)
+ for (i = 0; i < argc; i++)
                 close(streams[i].fd);
 
         free(streams);
diff --git a/src/blind-cat-rows.c b/src/blind-cat-rows.c
index 32113e5..a41655c 100644
--- a/src/blind-cat-rows.c
+++ b/src/blind-cat-rows.c
_AT_@ -1,26 +1,25 @@
 /* See LICENSE file for copyright and license details. */
 #include "common.h"
 
-USAGE("(file rows) ...")
+USAGE("file ...")
 
 int
 main(int argc, char *argv[])
 {
         struct stream *streams;
- size_t parts, height = 0, *rows, i;
+ size_t height = 0, *rows;
+ int i;
 
- UNOFLAGS(argc % 2 || !argc);
+ UNOFLAGS(!argc);
 
- parts = (size_t)argc / 2;
- streams = emalloc2(parts, sizeof(*streams));
- rows = alloca(parts * sizeof(*rows));
+ streams = emalloc2((size_t)argc, sizeof(*streams));
+ rows = alloca((size_t)argc * sizeof(*rows));
 
- for (i = 0; i < parts; i++) {
- eopen_stream(streams + i, argv[i * 2]);
- rows[i] = etozu_arg("rows", argv[i * 2 + 1], 1, SIZE_MAX);
+ for (i = 0; i < argc; i++) {
+ eopen_stream(streams + i, argv[i]);
                 if (streams[i].height > SIZE_MAX - height)
                         eprintf("output video is too wide\n");
- height += streams[i].height;
+ height += rows[i] = streams[i].height;
                 if (i) {
                         streams[i].height = streams->height;
                         echeck_compat(streams, streams + i);
_AT_@ -31,10 +30,10 @@ main(int argc, char *argv[])
         fprint_stream_head(stdout, streams);
         efflush(stdout, "<stdout>");
 
- for (i = 0; i < parts; i++, i = i == parts ? 0 : i)
+ for (i = 0; i < argc; i++, i = i == argc ? 0 : i)
                 if (esend_rows(streams + i, STDOUT_FILENO, rows[i], "<stdout>") != rows[i])
                         break;
- for (i = 0; i < parts; i++)
+ for (i = 0; i < argc; i++)
                 close(streams[i].fd);
 
         free(streams);
Received on Fri Jun 02 2017 - 22:32:22 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 02 2017 - 22:36:39 CEST