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-to-portable.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/blind-to-portable.c') diff --git a/src/blind-to-portable.c b/src/blind-to-portable.c index 39e3d58..651c756 100644 --- a/src/blind-to-portable.c +++ b/src/blind-to-portable.c @@ -89,10 +89,10 @@ USAGE("[-s]") } while (0) static uint64_t conv_double(double host) {CONV(double, uint64_t, int64_t, 11, 1023, 52);} -static uint32_t conv_float (float host) {CONV(float, uint32_t, int32_t, 8, 127, 23);} +static uint32_t conv_float (float host) {CONV(float, uint32_t, int32_t, 8, 127, 23);} -static void process_xyza (struct stream *stream, int strict) {PROCESS(double, uint64_t, 64);} -static void process_xyzaf(struct stream *stream, int strict) {PROCESS(float, uint32_t, 32);} +static void process_lf(struct stream *stream, int strict) {PROCESS(double, uint64_t, 64);} +static void process_f (struct stream *stream, int strict) {PROCESS(float, uint32_t, 32);} int main(int argc, char *argv[]) @@ -113,10 +113,10 @@ main(int argc, char *argv[]) eopen_stream(&stream, NULL); - if (!strcmp(stream.pixfmt, "xyza")) - process = process_xyza; - else if (!strcmp(stream.pixfmt, "xyza f")) - process = process_xyzaf; + if (stream.encoding == DOUBLE) + process = process_lf; + else if (stream.encoding == FLOAT) + process = process_f; else eprintf("pixel format %s is not supported\n", stream.pixfmt); -- cgit v1.2.3-70-g09d2