From d05d162cb81664f292834fa5d48d623d2b6147a7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 16 Jul 2017 15:29:43 +0200 Subject: Misc code improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-gauss-blur.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/blind-gauss-blur.c') diff --git a/src/blind-gauss-blur.c b/src/blind-gauss-blur.c index 3f4e08b..66583df 100644 --- a/src/blind-gauss-blur.c +++ b/src/blind-gauss-blur.c @@ -273,15 +273,15 @@ static size_t spread = 0; } while (0) static void -process_xyza(char *restrict output, char *restrict cbuf, char *restrict sbuf, - struct stream *colour, struct stream *sigma) +process_lf(char *restrict output, char *restrict cbuf, char *restrict sbuf, + struct stream *colour, struct stream *sigma) { PROCESS(double); } static void -process_xyzaf(char *restrict output, char *restrict cbuf, char *restrict sbuf, - struct stream *colour, struct stream *sigma) +process_f(char *restrict output, char *restrict cbuf, char *restrict sbuf, + struct stream *colour, struct stream *sigma) { PROCESS(float); } @@ -292,7 +292,7 @@ main(int argc, char *argv[]) struct stream colour, sigma; char *arg; void (*process)(char *restrict output, char *restrict cbuf, char *restrict sbuf, - struct stream *colour, struct stream *sigma); + struct stream *colour, struct stream *sigma); ARGBEGIN { case 'a': @@ -333,12 +333,7 @@ main(int argc, char *argv[]) eopen_stream(&colour, NULL); eopen_stream(&sigma, argv[0]); - if (!strcmp(colour.pixfmt, "xyza")) - process = process_xyza; - else if (!strcmp(colour.pixfmt, "xyza f")) - process = process_xyzaf; - else - eprintf("pixel format %s is not supported, try xyza\n", colour.pixfmt); + SELECT_PROCESS_FUNCTION(&colour); echeck_compat(&colour, &sigma); @@ -348,6 +343,5 @@ main(int argc, char *argv[]) fprint_stream_head(stdout, &colour); efflush(stdout, ""); process_each_frame_two_streams(&colour, &sigma, STDOUT_FILENO, "", process); - return 0; } -- cgit v1.2.3-70-g09d2