From 3569a10c97d41913dbf7cf3114cb4d2d5f17dc7f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 15 Jul 2017 17:08:02 +0200 Subject: Some improvements and fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-sinc-wave.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/blind-sinc-wave.c') diff --git a/src/blind-sinc-wave.c b/src/blind-sinc-wave.c index 4ee2b52..f809c8e 100644 --- a/src/blind-sinc-wave.c +++ b/src/blind-sinc-wave.c @@ -5,7 +5,6 @@ USAGE("[-e] [theta0-stream]") static int equal = 0; - #define PROCESS(TYPE, SUFFIX)\ static void\ process_##SUFFIX(struct stream *grad, struct stream *theta0)\ @@ -70,7 +69,6 @@ static int equal = 0; PROCESS(double, lf) PROCESS(float, f) - int main(int argc, char *argv[]) { @@ -96,9 +94,9 @@ main(int argc, char *argv[]) eprintf("theta0-stream must be of dimension 1x1\n"); } - if (!strcmp(stream.pixfmt, "xyza")) + if (stream.encoding == DOUBLE) process = process_lf; - else if (!strcmp(stream.pixfmt, "xyza f")) + else if (stream.encoding == FLOAT) process = process_f; else eprintf("pixel format %s is not supported, try xyza\n", stream.pixfmt); -- cgit v1.2.3-70-g09d2