diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-01-13 09:05:08 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-01-13 09:05:08 +0100 |
| commit | 4674ec0e4b833ab0d0365225ba99228df14abe87 (patch) | |
| tree | 1b89fe1559fc9a2422e20048700e694a72d17751 /src/vu-flop.c | |
| parent | vu-from-video: fix Y'UV encoding + add vu-to-video (diff) | |
| download | blind-4674ec0e4b833ab0d0365225ba99228df14abe87.tar.gz blind-4674ec0e4b833ab0d0365225ba99228df14abe87.tar.bz2 blind-4674ec0e4b833ab0d0365225ba99228df14abe87.tar.xz | |
Rename to blind
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/vu-flop.c')
| -rw-r--r-- | src/vu-flop.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/vu-flop.c b/src/vu-flop.c deleted file mode 100644 index e98771d..0000000 --- a/src/vu-flop.c +++ /dev/null @@ -1,44 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#include "stream.h" -#include "util.h" - -#include <inttypes.h> -#include <string.h> -#include <unistd.h> - -USAGE("") - -int -main(int argc, char *argv[]) -{ - struct stream stream; - char *buf, *image; - size_t i, j, n, m; - - ENOFLAGS(argc); - - stream.file = "<stdin>"; - stream.fd = STDIN_FILENO; - einit_stream(&stream); - fprint_stream_head(stdout, &stream); - efflush(stdout, "<stdout>"); - - if (stream.width > SIZE_MAX / stream.pixel_size) - eprintf("<stdin>: video frame is too wide\n"); - n = stream.width * stream.pixel_size; - buf = emalloc(n); - image = emalloc(n); - - m = n - stream.pixel_size; - memcpy(buf, stream.buf, stream.ptr); - while (eread_row(&stream, buf, n)) { - for (i = 0; i < stream.pixel_size; i++) - for (j = 0; j < n; j += stream.pixel_size) - image[m - j + i] = buf[i + j]; - ewriteall(STDOUT_FILENO, image, n, "<stdout>"); - } - - free(buf); - free(image); - return 0; -} |
