This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via 33b95fd86ead735cd54f3b0f7cf87c779a4370ad (commit)
from 18f21817f0ccdf5e4024183595e127eec8ce7744 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/33b95fd86ead735cd54f3b0f7cf87c779a43…
commit 33b95fd86ead735cd54f3b0f7cf87c779a4370ad
Author: Tomas Gavenciak <gavento(a)ucw.cz>
Date: Sat Dec 22 22:37:06 2012 +0100
core: Add a C backtrace to GP_ABORT
diff --git a/configure b/configure
index 6eead34..d2f2d43 100755
--- a/configure
+++ b/configure
@@ -238,7 +238,7 @@ if __name__ == '__main__':
#
# name, description, [detection], cflags, ldflags, list of modules library is needed for
#
- l = libraries([["libpng",
+ l = libraries([["libpng",
"Portable Network Graphics Library",
[header_exists, "png.h"], "", "-lpng", ["loaders"]],
["libsdl",
@@ -262,6 +262,10 @@ if __name__ == '__main__':
["dl",
"Dynamic linker",
[header_exists, "dlfcn.h"], "", "-ldl", ["core"]],
+ ["backtrace",
+ "C stack trace writeout",
+ [c_try_compile, "#include <execinfo.h>nint main(void) { backtrace(0, 0); }",
+ "Checking for backtrace() ... "], "", "", ["core"]],
["V4L2",
"Video for linux 2",
[header_exists, "linux/videodev2.h"], "", "", ["grabbers"]]], cfg)
diff --git a/include/core/GP_Common.h b/include/core/GP_Common.h
index 95731b7..1140e76 100644
--- a/include/core/GP_Common.h
+++ b/include/core/GP_Common.h
@@ -99,13 +99,14 @@
* and prints message and calls abort().
* GP_GENERAL_CHECK is a check with specified message prefix
* (for assert and check)
- *
- * SWIG_print_trace() prints a trace of Python stack if a Python interpreter
- * is set up. In case more wrappers are written, should print a trace
- * for the currently active.
*/
-void SWIG_print_trace(void);
+/*
+ * Print as much trace info as possible. Currently, the (C) call stack and
+ * the Python stack if a Python interpreter is set up. In case more wrappers
+ * are written, it should print a trace for the currently active.
+ */
+void GP_PrintAbortInfo(void);
#define GP_INTERNAL_ABORT_BUFSIZE 1024
#define GP_INTERNAL_ABORT(str_abort_msg_, ...) do { @@ -118,8 +119,8 @@ void SWIG_print_trace(void);
buf += snprintf(buf, bufend - buf, "abort()"); else buf += snprintf(buf, bufend - buf, " " __VA_ARGS__); - SWIG_print_trace(); fprintf(stderr, "%sn", bufstart); + GP_PrintAbortInfo(); abort(); } while (0)
diff --git a/libs/core/GP_Common.c b/libs/core/GP_Common.c
index 2cf6fc9..52c4920 100644
--- a/libs/core/GP_Common.c
+++ b/libs/core/GP_Common.c
@@ -24,14 +24,35 @@
#include "../config.h"
-#include "core/GP_Common.h"
+#include <stdio.h>
+
+#ifdef HAVE_BACKTRACE
+#include <execinfo.h>
+#endif /* HAVE_BACKTRACE */
#ifdef HAVE_DL
#include <dlfcn.h>
#endif /* HAVE_DL */
+#include "core/GP_Common.h"
+
+#define GP_ABORT_INFO_TRACE_LEVELS 20
+
+
+void GP_PrintCStack(void)
+{
+#ifdef HAVE_BACKTRACE
+#if GP_ABORT_INFO_TRACE_LEVELS > 0
+ void * buffer[GP_ABORT_INFO_TRACE_LEVELS + 1];
+ int size = backtrace(buffer, GP_ABORT_INFO_TRACE_LEVELS);
+ fprintf(stderr, "nC stack trace (most recent call first):n");
+ fflush(stderr);
+ backtrace_symbols_fd(buffer, size, fileno(stderr));
+#endif /* GP_ABORT_INFO_TRACE_LEVELS > 0 */
+#endif /* HAVE_BACKTRACE */
+}
-void SWIG_print_trace(void)
+void GP_PrintPythonStack(void)
{
#ifdef HAVE_DL
/* Print python stack trace in case python lib is loaded and
@@ -40,7 +61,17 @@ void SWIG_print_trace(void)
int (*dl_PyRun_SimpleString)(const char *);
dl_Py_IsInitialized = dlsym(RTLD_DEFAULT, "Py_IsInitialized");
dl_PyRun_SimpleString = dlsym(RTLD_DEFAULT, "PyRun_SimpleString");
- if (dl_Py_IsInitialized && dl_PyRun_SimpleString && dl_Py_IsInitialized())
+ if (dl_Py_IsInitialized && dl_PyRun_SimpleString && dl_Py_IsInitialized()) {
+ fprintf(stderr, "nPython stack trace (most recent call last; ignore last line):n");
+ fflush(stderr);
dl_PyRun_SimpleString("import traceback; traceback.print_stack();");
+ }
#endif /* HAVE_DL */
}
+
+void GP_PrintAbortInfo(void)
+{
+ GP_PrintPythonStack();
+ GP_PrintCStack();
+}
+
-----------------------------------------------------------------------
Summary of changes:
configure | 6 +++++-
include/core/GP_Common.h | 13 +++++++------
libs/core/GP_Common.c | 37 ++++++++++++++++++++++++++++++++++---
3 files changed, 46 insertions(+), 10 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via 18f21817f0ccdf5e4024183595e127eec8ce7744 (commit)
from a3c538fd80eb28f103161ce90aa03b05da303866 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/18f21817f0ccdf5e4024183595e127eec8ce…
commit 18f21817f0ccdf5e4024183595e127eec8ce7744
Author: Tomas Gavenciak <gavento(a)ucw.cz>
Date: Sat Dec 22 02:34:59 2012 +0100
configure: update configure to look for libdl
diff --git a/configure b/configure
index db5733f..6eead34 100755
--- a/configure
+++ b/configure
@@ -259,6 +259,9 @@ if __name__ == '__main__':
["freetype",
"A high-quality and portable font engine",
[header_exists, "ft2build.h"], "", "`freetype-config --libs`", ["core"]],
+ ["dl",
+ "Dynamic linker",
+ [header_exists, "dlfcn.h"], "", "-ldl", ["core"]],
["V4L2",
"Video for linux 2",
[header_exists, "linux/videodev2.h"], "", "", ["grabbers"]]], cfg)
-----------------------------------------------------------------------
Summary of changes:
configure | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via 5a09bd55e0ab64565d12d30ef583d9572d66d6be (commit)
from 61678e75ea1a079599578d9590e50bdd6740def4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/5a09bd55e0ab64565d12d30ef583d9572d66…
commit 5a09bd55e0ab64565d12d30ef583d9572d66d6be
Author: Tomas Gavenciak <gavento(a)ucw.cz>
Date: Fri Dec 21 00:23:25 2012 +0100
Reformulate part of codegen docs
diff --git a/doc/gen.txt b/doc/gen.txt
index 949f585..1cdf906 100644
--- a/doc/gen.txt
+++ b/doc/gen.txt
@@ -24,29 +24,45 @@ class PixelSize(object):
self.suffix = suffix
- self.bit_endian = bit_endian
-
- def needs_bit_endian(self):
+ self.bit_endian = bit_endian
...
-
+
-------------------------------------------------------------------------------
The Pixel Size object represents pixel as a continous block of data.
-The 'size' is size in bits and is sometimes called bpp which stands for bits
-per pixel. It also contains suffix that is a string used as a suffix for
-functions that manipulates with this pixel size.
+The 'size' is size in bits and is sometimes called bpp which stands for "bits
+per pixel". This number includes padding bits, if any.
+
+The 'suffix' is a string used as a suffix for functions, macros and other
+identifiers that operate with this pixel size.
+
+The 'bit_endian' determines the ordering of pixel bits within a byte in bitmaps
+and graymaps. This is significant in pixel types with pixel boundaries
+within a byte, i.e. 1 bpp, 4 bpp or 17 bpp.
+
+It can be either 'BE' or 'LE' (i.e. most significant bit left or right in the bitmap).
+Usually, the bitmap is ordered with left bits earlier in the memory, but the
+earlier/later relationship is important.
+This is defined in terms of natural pixel ordering within the memory.
+
+'BE' means that the earlier (usually left-most) pixels use the higher ("big")
+bits of the byte. I.e. in 1 bpp, the first pixel would have value 128, the second 64
+and so on.
+
+'LE' means that the earlier (usually left-most) pixels use the lower ("little")
+bits of the byte. I.e. in 1 bpp, the first pixel would have value 1, the second 2,
+the eight'th 128 and so on.
-The 'bit_endian' determines direction of bits in bitmaps and graymaps (i.e.
-most significant bit left or right). It can be either 'BE' or 'LE'. To avoid
-confusion following two figures describes bits layout in 1 bit and 2 bits
+The following two figures describe bit layout in 1 bpp and 2 bpp
grayscale bitmaps. The rectangles in the figures represents bytes as they are
-in the buffer. The start of the image (i.e. topleft corner and coodinate 0,0)
-is on the left side. The numbers describes position of the bit in the byte (as
-seen by shifts and bitmask from within C language implementation).
+in the bitmap memory. The start of the image (i.e. topleft corner
+and coodinates (0,0)) is on the left side.
+The numbers describe position of the bit in the byte, 'i' representing
+value '1<<i', that is 7-th bit representing value 128 and 0-th bit value 1.
BE
-~~
+++
["graphviz", "bit-endian-be-1bit.png"]
------------------------------------------------------------------------------
@@ -87,7 +103,7 @@ digraph bit_endian {
------------------------------------------------------------------------------
LE
-~~
+++
["graphviz", "bit-endian-le-1bit.png"]
------------------------------------------------------------------------------
@@ -115,9 +131,9 @@ digraph bit_endian {
rankdir = LR;
node0 [label = "<e> ..."];
- node1 [label = "{0 1 | 2 3 | 4 5 | <e> 6 7}"];
- node2 [label = "{<b> 0 1 | 2 3 | 4 5 | <e> 6 7}"];
- node3 [label = "{<b> 0 1 | 2 3 | 4 5 | <e> 6 7}"];
+ node1 [label = "{1 0 | 3 2 | 5 4 | <e> 7 6}"];
+ node2 [label = "{<b> 1 0 | 3 2 | 5 4 | <e> 7 6}"];
+ node3 [label = "{<b> 1 0 | 3 2 | 5 4 | <e> 7 6}"];
node4 [label = "{<b> ...}"];
node0:e -> node1:b;
@@ -127,9 +143,10 @@ digraph bit_endian {
}
------------------------------------------------------------------------------
-NOTE: Different pixels can share the same pixel size as for certain types
- of operations the function doesn't depend on actual arrangements of the
- color channels in pixel (i.e. Get/Put Pixel, Rotate buffer 90 degrees, etc...).
+NOTE: Different pixel types (i.e. RGB888 and BGR888) can share the same pixel
+ size, since certain types of operations do not depend on the actual
+ arrangement of the color channels in a pixel
+ (i.e. get/put pixel, rotate buffer 90 degrees, etc.).
TODO: Rename size to bpp?
-----------------------------------------------------------------------
Summary of changes:
doc/gen.txt | 59 ++++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 38 insertions(+), 21 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via 61678e75ea1a079599578d9590e50bdd6740def4 (commit)
from f7a7118fd7ba106dfcc1eb7bbff7aed723f0d6f0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/61678e75ea1a079599578d9590e50bdd6740…
commit 61678e75ea1a079599578d9590e50bdd6740def4
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Thu Dec 20 17:47:46 2012 +0100
libs: backends: GP_X11: Add XFlush() after BackendUdate().
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c
index aaa363f..33a0666 100644
--- a/libs/backends/GP_X11.c
+++ b/libs/backends/GP_X11.c
@@ -129,6 +129,8 @@ static void x11_flip(GP_Backend *self)
XPutImage(x11->dpy, x11->win, DefaultGC(x11->dpy, x11->scr),
x11->img, 0, 0, 0, 0, w, h);
+ XFlush(x11->dpy);
+
XUnlockDisplay(x11->dpy);
}
-----------------------------------------------------------------------
Summary of changes:
libs/backends/GP_X11.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via f7a7118fd7ba106dfcc1eb7bbff7aed723f0d6f0 (commit)
from c7b776f3628256d94d62b176ccf72743f832fa45 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/f7a7118fd7ba106dfcc1eb7bbff7aed723f0…
commit f7a7118fd7ba106dfcc1eb7bbff7aed723f0d6f0
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Thu Dec 20 17:37:14 2012 +0100
doc: Makefile: add check for source-highlight.
diff --git a/doc/Makefile b/doc/Makefile
index b87a688..7bda21b 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -25,6 +25,8 @@ all: toolcheck examples.html $(PAGES) api.html
toolcheck:
@if [ -z `which asciidoc 2>/dev/null` ] ; then echo "ERROR: Could not find 'asciidoc'" ; exit 127 ; fi
+ @if [ -z `which source-highlight 2>/dev/null` ] ; then + echo "ERROR: Could not find 'source-highlight'" ; exit 127 ; fi
@if [ ! -d "/usr/share/graphviz" ] ; then echo "ERROR: Could not find 'graphviz'" ; exit 127 ; fi
@if [ -z `which latex 2>/dev/null` ] ; then
-----------------------------------------------------------------------
Summary of changes:
doc/Makefile | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via b91ac3947efd9ef282fb01e5152b3190f5f1352e (commit)
via 208c6b8986ccb87c14f2c2d8eb88eb123d99a22b (commit)
via 64d17b5956bac389cd3ea3ca2b56a8b9051f2f9f (commit)
from 75c90b1ae9699e0076e8006a9818a076cd345d95 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/b91ac3947efd9ef282fb01e5152b3190f5f1…
commit b91ac3947efd9ef282fb01e5152b3190f5f1352e
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Thu Dec 20 17:22:35 2012 +0100
doc: Fix previous changes in Makefile.
diff --git a/doc/Makefile b/doc/Makefile
index eb86df8..b87a688 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -23,16 +23,12 @@ all: toolcheck examples.html $(PAGES) api.html
# Check if we have all the needed tools
#
toolcheck:
- @echo "Checking if documentation tools are present..."
@if [ -z `which asciidoc 2>/dev/null` ] ; then - echo "Could not find 'asciidoc'" ; exit 127 ; fi
+ echo "ERROR: Could not find 'asciidoc'" ; exit 127 ; fi
@if [ ! -d "/usr/share/graphviz" ] ; then - echo "Could not find 'graphviz'" ; exit 127 ; fi
- @if [ ! -e "/usr/lib/graphviz/python/gv.py" ] ; then - echo "Found 'graphviz' but not Python bindings" ; exit 127 ; fi
+ echo "ERROR: Could not find 'graphviz'" ; exit 127 ; fi
@if [ -z `which latex 2>/dev/null` ] ; then - echo "Could not find 'latex'" ; exit 127 ; fi
- @echo " ...seems okay"
+ echo "ERROR: Could not find 'latex'" ; exit 127 ; fi
#
# Create page for each part of API description
http://repo.or.cz/w/gfxprim.git/commit/208c6b8986ccb87c14f2c2d8eb88eb123d99…
commit 208c6b8986ccb87c14f2c2d8eb88eb123d99a22b
Merge: 64d17b5 75c90b1
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Thu Dec 20 17:18:32 2012 +0100
Merge ssh://repo.or.cz/srv/git/gfxprim
http://repo.or.cz/w/gfxprim.git/commit/64d17b5956bac389cd3ea3ca2b56a8b9051f…
commit 64d17b5956bac389cd3ea3ca2b56a8b9051f2f9f
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Thu Dec 20 16:19:37 2012 +0100
spiv: Fix debug message in image cache.
diff --git a/demos/spiv/image_cache.c b/demos/spiv/image_cache.c
index 924c392..00712c9 100644
--- a/demos/spiv/image_cache.c
+++ b/demos/spiv/image_cache.c
@@ -239,14 +239,14 @@ int image_cache_put(struct image_cache *self, GP_Context *ctx, const char *path,
return 1;
}
- GP_DEBUG(2, "Adding image '%s:%10li:%10li' size %zu",
- img->path, img->cookie1, img->cookie2, size);
-
img->ctx = ctx;
img->cookie1 = cookie1;
img->cookie2 = cookie2;
img->elevated = 0;
strcpy(img->path, path);
+
+ GP_DEBUG(2, "Adding image '%s:%10li:%10li' size %zu",
+ img->path, img->cookie1, img->cookie2, size);
add_img(self, img, size);
-----------------------------------------------------------------------
Summary of changes:
demos/spiv/image_cache.c | 6 +++---
doc/Makefile | 10 +++-------
2 files changed, 6 insertions(+), 10 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project gfxprim.git.
The branch, master has been updated
via 75c90b1ae9699e0076e8006a9818a076cd345d95 (commit)
from 94726f09c80a120c03ee251338f2a2800bdaa076 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/gfxprim.git/commit/75c90b1ae9699e0076e8006a9818a076cd34…
commit 75c90b1ae9699e0076e8006a9818a076cd345d95
Author: Jiri BlueBear Dluhos <jiri.bluebear.dluhos(a)gmail.com>
Date: Thu Dec 20 17:17:19 2012 +0100
'make doc' checks for necessary tools.
diff --git a/doc/Makefile b/doc/Makefile
index eef29cd..eb86df8 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -15,7 +15,24 @@ GENIMAGES=discrete_linear_1D_convolution_alg1 discrete_linear_1D_convolution_alg
PAGES=$(subst .txt,.html,$(SOURCES))
PAGES+=$(subst .txt,.html,$(EXAMPLE_SOURCES))
-all: examples.html $(PAGES) api.html
+.PHONY: toolcheck clean
+
+all: toolcheck examples.html $(PAGES) api.html
+
+#
+# Check if we have all the needed tools
+#
+toolcheck:
+ @echo "Checking if documentation tools are present..."
+ @if [ -z `which asciidoc 2>/dev/null` ] ; then + echo "Could not find 'asciidoc'" ; exit 127 ; fi
+ @if [ ! -d "/usr/share/graphviz" ] ; then + echo "Could not find 'graphviz'" ; exit 127 ; fi
+ @if [ ! -e "/usr/lib/graphviz/python/gv.py" ] ; then + echo "Found 'graphviz' but not Python bindings" ; exit 127 ; fi
+ @if [ -z `which latex 2>/dev/null` ] ; then + echo "Could not find 'latex'" ; exit 127 ; fi
+ @echo " ...seems okay"
#
# Create page for each part of API description
-----------------------------------------------------------------------
Summary of changes:
doc/Makefile | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")