mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-01 05:39:51 +00:00
coloreffects: Coding style fixes
This commit is contained in:
parent
2c14a8fbcd
commit
5435ae849e
4 changed files with 11 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include <gst/controller/gstcontroller.h>
|
||||
|
||||
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__ */
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
* <refsect2>
|
||||
* <title>Example launch line</title>
|
||||
* |[
|
||||
* 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.
|
||||
* </refsect2>
|
||||
*/
|
||||
|
@ -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];
|
||||
|
|
|
@ -77,7 +77,7 @@ struct _GstColorEffects
|
|||
gint height;
|
||||
gint size;
|
||||
|
||||
void (*process) (GstColorEffects *filter, guint8 *data);
|
||||
void (*process) (GstColorEffects * filter, guint8 * data);
|
||||
};
|
||||
|
||||
struct _GstColorEffectsClass
|
||||
|
|
Loading…
Reference in a new issue