On Sat, Nov 26, 2005 at 08:24:42PM +0000, James Gatt wrote:
> Ville Syrjälä wrote:
>
> >>Is there any debugging output I can enable from DirectFB (especially the
> >>matrox driver) which will help?
> >>
> >>
> >
> >You could compile with --enable-trace which should give a backtrace
> >without gdb.
> >
> >AFAICS the only place in maven_init() where it could segfault is
> >direct_memcpy(). But I don't think it's actually segfaulting there
> >because then the segfault should happen when calling DirectFBCreate().
> >
> >
> >
> I think maven_init() might be a red herring... I've rebuilt DirectFB
> from source (not using a Gentoo ebuild) and it's crashing when calling
> RGB_TO_YCBCR() in the second iteration of the loop in spicSetRegion().
RGB_TO_YCBCR() was changed to use pre-computed tables. The tables
are indexed using values the can be negative. Maybe that is the cause
for the segfault.
Try this patch:
Index: src/gfx/convert.h
===================================================================
RCS file: /cvs/directfb/DirectFB/src/gfx/convert.h,v
retrieving revision 1.30
diff -u -r1.30 convert.h
--- src/gfx/convert.h 30 Apr 2005 14:17:22 -0000 1.30
+++ src/gfx/convert.h 27 Nov 2005 14:21:32 -0000
@@ -231,8 +231,8 @@
_r = (r); _g = (g); _b = (b);\
_ey = (19595 * _r + 38469 * _g + 7471 * _b) >> 16;\
(y) = y_from_ey[_ey]; \
- (cb) = cb_from_bey[_b-_ey]; \
- (cr) = cr_from_rey[_r-_ey]; \
+ (cb) = cb_from_bey[_b-_ey+255]; \
+ (cr) = cr_from_rey[_r-_ey+255]; \
} while (0)
Index: src/gfx/generic/yuvtbl-gen.c
===================================================================
RCS file: /cvs/directfb/DirectFB/src/gfx/generic/yuvtbl-gen.c,v
retrieving revision 1.2
diff -u -r1.2 yuvtbl-gen.c
--- src/gfx/generic/yuvtbl-gen.c 30 Apr 2005 14:14:41 -0000
1.2
+++ src/gfx/generic/yuvtbl-gen.c 27 Nov 2005 14:21:32 -0000
@@ -192,8 +192,8 @@
gt.mul = ECR_FACTOR * 224.0 / 255.0;
dump_table( > );
- puts( "const __u16 *cb_from_bey = &_cb_from_bey[255];" );
- puts( "const __u16 *cr_from_rey = &_cr_from_rey[255];" );
+ puts( "const __u16 *cb_from_bey = &_cb_from_bey[0];" );
+ puts( "const __u16 *cr_from_rey = &_cr_from_rey[0];" );
/* end headers */
puts( "" );
Index: src/gfx/generic/yuvtbl.h
===================================================================
RCS file: /cvs/directfb/DirectFB/src/gfx/generic/yuvtbl.h,v
retrieving revision 1.4
diff -u -r1.4 yuvtbl.h
--- src/gfx/generic/yuvtbl.h 30 Apr 2005 14:14:41 -0000 1.4
+++ src/gfx/generic/yuvtbl.h 27 Nov 2005 14:21:32 -0000
@@ -293,7 +293,7 @@
240, 240
};
-const __u16 *cb_from_bey = &_cb_from_bey[255];
-const __u16 *cr_from_rey = &_cr_from_rey[255];
+const __u16 *cb_from_bey = &_cb_from_bey[0];
+const __u16 *cr_from_rey = &_cr_from_rey[0];
#endif /* __YUV_TABLES_H__ */
--
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users