diff options
author | Olivier Crete <olivier.crete@collabora.co.uk> | 2008-04-24 22:46:27 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-17 19:29:04 +0100 |
commit | f92c1b9234afdf15882f144c6bd603461941949e (patch) | |
tree | 7b6c66f732860080de8917d578b1d3898c002cd6 /gst | |
parent | 341a88cd0462afd5c21a49fcf5a1bf4ebe64bb16 (diff) | |
download | gst-plugins-bad-f92c1b9234afdf15882f144c6bd603461941949e.tar.gz gst-plugins-bad-f92c1b9234afdf15882f144c6bd603461941949e.tar.bz2 gst-plugins-bad-f92c1b9234afdf15882f144c6bd603461941949e.zip |
[MOVED FROM GST-P-FARSIGHT] Use Glib G_{MAX,MIN}{U,}INT{8,16,32} macros
20080424224627-3e2dc-1036bc58b6b4db2f9f12831cdbae3bc613facbbf.gz
Diffstat (limited to 'gst')
-rw-r--r-- | gst/liveadder/liveadder.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index d7ec7ed9..8ebb2a8f 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -126,21 +126,6 @@ static gboolean gst_live_adder_sink_event (GstPad * pad, GstEvent * event); -/* highest positive/lowest negative x-bit value we can use for clamping */ -#define MAX_INT_32 ((gint32) (0x7fffffff)) -#define MAX_INT_16 ((gint16) (0x7fff)) -#define MAX_INT_8 ((gint8) (0x7f)) -#define MAX_UINT_32 ((guint32)(0xffffffff)) -#define MAX_UINT_16 ((guint16)(0xffff)) -#define MAX_UINT_8 ((guint8) (0xff)) - -#define MIN_INT_32 ((gint32) (0x80000000)) -#define MIN_INT_16 ((gint16) (0x8000)) -#define MIN_INT_8 ((gint8) (0x80)) -#define MIN_UINT_32 ((guint32)(0x00000000)) -#define MIN_UINT_16 ((guint16)(0x0000)) -#define MIN_UINT_8 ((guint8) (0x00)) - /* clipping versions */ #define MAKE_FUNC(name,type,ttype,min,max) \ static void name (type *out, type *in, gint bytes) { \ @@ -158,12 +143,12 @@ static void name (type *out, type *in, gint bytes) { \ } /* *INDENT-OFF* */ -MAKE_FUNC (add_int32, gint32, gint64, MIN_INT_32, MAX_INT_32) -MAKE_FUNC (add_int16, gint16, gint32, MIN_INT_16, MAX_INT_16) -MAKE_FUNC (add_int8, gint8, gint16, MIN_INT_8, MAX_INT_8) -MAKE_FUNC (add_uint32, guint32, guint64, MIN_UINT_32, MAX_UINT_32) -MAKE_FUNC (add_uint16, guint16, guint32, MIN_UINT_16, MAX_UINT_16) -MAKE_FUNC (add_uint8, guint8, guint16, MIN_UINT_8, MAX_UINT_8) +MAKE_FUNC (add_int32, gint32, gint64, G_MININT32, G_MAXINT32) +MAKE_FUNC (add_int16, gint16, gint32, G_MININT16, G_MAXINT16) +MAKE_FUNC (add_int8, gint8, gint16, G_MININT8, G_MAXINT8) +MAKE_FUNC (add_uint32, guint32, guint64, 0, G_MAXUINT32) +MAKE_FUNC (add_uint16, guint16, guint32, 0, G_MAXUINT16) +MAKE_FUNC (add_uint8, guint8, guint16, 0, G_MAXUINT8) MAKE_FUNC_NC (add_float64, gdouble, gdouble) MAKE_FUNC_NC (add_float32, gfloat, gfloat) /* *INDENT-ON* */ |