From 5435ae849e08f57a7ade83a936ce44ee100923bd Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Tue, 19 Apr 2011 19:09:30 +0200 Subject: [PATCH] coloreffects: Coding style fixes --- gst/coloreffects/gstchromahold.c | 3 ++- gst/coloreffects/gstchromahold.h | 6 ++---- gst/coloreffects/gstcoloreffects.c | 9 ++++++--- gst/coloreffects/gstcoloreffects.h | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gst/coloreffects/gstchromahold.c b/gst/coloreffects/gstchromahold.c index 3e8c1fa..a563ab3 100644 --- a/gst/coloreffects/gstchromahold.c +++ b/gst/coloreffects/gstchromahold.c @@ -91,7 +91,8 @@ static GstStaticPadTemplate gst_chroma_hold_sink_template = } G_STMT_END #define GST_CHROMA_HOLD_UNLOCK(self) G_STMT_START { \ - GST_LOG_OBJECT (self, "Unlocking chromahold from thread %p", g_thread_self ()); \ + GST_LOG_OBJECT (self, "Unlocking chromahold from thread %p", \ + g_thread_self ()); \ g_static_mutex_unlock (&self->lock); \ } G_STMT_END diff --git a/gst/coloreffects/gstchromahold.h b/gst/coloreffects/gstchromahold.h index a189113..429db13 100644 --- a/gst/coloreffects/gstchromahold.h +++ b/gst/coloreffects/gstchromahold.h @@ -31,7 +31,6 @@ #include G_BEGIN_DECLS - #define GST_TYPE_CHROMA_HOLD \ (gst_chroma_hold_get_type()) #define GST_CHROMA_HOLD(obj) \ @@ -42,7 +41,6 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CHROMA_HOLD)) #define GST_IS_CHROMA_HOLD_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CHROMA_HOLD)) - typedef struct _GstChromaHold GstChromaHold; typedef struct _GstChromaHoldClass GstChromaHoldClass; @@ -64,7 +62,8 @@ struct _GstChromaHold guint tolerance; /* processing function */ - void (*process) (guint8 *dest, gint width, gint height, GstChromaHold *chroma_hold); + void (*process) (guint8 * dest, gint width, gint height, + GstChromaHold * chroma_hold); /* pre-calculated values */ gint hue; @@ -78,5 +77,4 @@ struct _GstChromaHoldClass GType gst_chroma_hold_get_type (void); G_END_DECLS - #endif /* __GST_CHROMA_HOLD_H__ */ diff --git a/gst/coloreffects/gstcoloreffects.c b/gst/coloreffects/gstcoloreffects.c index 4c872c6..df78b86 100644 --- a/gst/coloreffects/gstcoloreffects.c +++ b/gst/coloreffects/gstcoloreffects.c @@ -25,7 +25,8 @@ * * Example launch line * |[ - * gst-launch -v videotestsrc ! coloreffects preset=heat ! ffmpegcolorspace ! autovideosink + * gst-launch -v videotestsrc ! coloreffects preset=heat ! ffmpegcolorspace ! + * autovideosink * ]| This pipeline shows the effect of coloreffects on a test stream. * */ @@ -264,7 +265,8 @@ static const gint cog_rgb_to_ycbcr_matrix_8bit_sdtv[] = { 112, -94, -18, 32768, }; -#define APPLY_MATRIX(m,o,v1,v2,v3) ((m[o*4] * v1 + m[o*4+1] * v2 + m[o*4+2] * v3 + m[o*4+3]) >> 8) +#define APPLY_MATRIX(m,o,v1,v2,v3) ((m[o*4] * v1 + m[o*4+1] * v2 + \ + m[o*4+2] * v3 + m[o*4+3]) >> 8) static void gst_color_effects_transform_rgb (GstColorEffects * filter, guint8 * data) @@ -306,7 +308,8 @@ gst_color_effects_transform_rgb (GstColorEffects * filter, guint8 * data) /* 0.2126 R + 0.7152 G + 0.0722 B */ luma = ((r << 8) * 54) + ((g << 8) * 183) + ((b << 8) * 19); luma >>= 16; /* get integer part */ - luma *= 3; /* times 3 to retrieve the correct pixel from the lut */ + luma *= 3; /* times 3 to retrieve the correct pixel from + * the lut */ /* map luma to lookup table */ /* src.luma |-> table[luma].rgb */ data[offsets[0]] = filter->table[luma]; diff --git a/gst/coloreffects/gstcoloreffects.h b/gst/coloreffects/gstcoloreffects.h index b549ff1..04e52a9 100644 --- a/gst/coloreffects/gstcoloreffects.h +++ b/gst/coloreffects/gstcoloreffects.h @@ -77,7 +77,7 @@ struct _GstColorEffects gint height; gint size; - void (*process) (GstColorEffects *filter, guint8 *data); + void (*process) (GstColorEffects * filter, guint8 * data); }; struct _GstColorEffectsClass -- 2.7.4