[babl] tools: add babl-verify start of an development aid when improving fast paths
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] tools: add babl-verify start of an development aid when improving fast paths
- Date: Sat, 19 Nov 2016 11:52:47 +0000 (UTC)
commit bf688453e09e879c23f73bdc53bd7ca442bc9236
Author: Øyvind Kolås <pippin gimp org>
Date: Wed Nov 16 20:40:58 2016 +0100
tools: add babl-verify start of an development aid when improving fast paths
This tool take the names of source/target formats - and prints error/cost for
all direct conversions matching arguments.
tools/babl-verify.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/tools/babl-verify.c b/tools/babl-verify.c
new file mode 100644
index 0000000..15654e2
--- /dev/null
+++ b/tools/babl-verify.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "babl/babl.h"
+
+int main (int argc, char **argv)
+{
+ if (argc != 3)
+ {
+ fprintf (stderr, "need two args, from and to babl-formats\n");
+ return -1;
+ }
+ setenv ("BABL_DEBUG_CONVERSIONS", "1", 0);
+ babl_init ();
+ babl_fish (babl_format(argv[1]), babl_format (argv[2]));
+ babl_exit ();
+
+ return 0;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]