/*
* GStreamer
- * Copyright (C) >2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
*
* Burn - curve adjustment video effect.
* Based on Pete Warden's FreeFrame plugin with the same name.
GstVideoFrame * in_frame, GstVideoFrame * out_frame)
{
GstBurn *filter = GST_BURN (vfilter);
- gint video_size, adjustment, width, height;
+ gint video_size, adjustment;
guint32 *src, *dest;
GstClockTime timestamp;
gint64 stream_time;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = GST_VIDEO_FRAME_WIDTH (in_frame);
- height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
- video_size = width * height;
+ video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+ GST_VIDEO_FRAME_HEIGHT (in_frame);
/* GstController: update the properties */
timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
GstVideoFrame * in_frame, GstVideoFrame * out_frame)
{
GstChromium *filter = GST_CHROMIUM (vfilter);
- gint video_size, edge_a, edge_b, width, height;
+ gint video_size, edge_a, edge_b;
guint32 *src, *dest;
GstClockTime timestamp;
gint64 stream_time;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = GST_VIDEO_FRAME_WIDTH (in_frame);
- height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
/* GstController: update the properties */
timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
stream_time =
edge_b = filter->edge_b;
GST_OBJECT_UNLOCK (filter);
- video_size = width * height;
+ video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+ GST_VIDEO_FRAME_HEIGHT (in_frame);
transform (src, dest, video_size, edge_a, edge_b);
return GST_FLOW_OK;
/*
* GStreamer
- * Copyright (C) <2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
*
* Dodge - saturation video effect.
* Based on Pete Warden's FreeFrame plugin with the same name.
{
GstDodge *filter = GST_DODGE (vfilter);
guint32 *src, *dest;
- gint video_size, width, height;
+ gint video_size;
GstClockTime timestamp;
gint64 stream_time;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = GST_VIDEO_FRAME_WIDTH (in_frame);
- height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
+ /* GstController: update the properties */
timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
stream_time =
gst_segment_to_stream_time (&GST_BASE_TRANSFORM (filter)->segment,
if (GST_CLOCK_TIME_IS_VALID (stream_time))
gst_object_sync_values (GST_OBJECT (filter), stream_time);
- video_size = width * height;
+ video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+ GST_VIDEO_FRAME_HEIGHT (in_frame);
transform (src, dest, video_size);
/*
* GStreamer
- * Copyright (C) <2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
*
* Exclusion - color exclusion video effect.
* Based on Pete Warden's FreeFrame plugin with the same name.
GstVideoFrame * in_frame, GstVideoFrame * out_frame)
{
GstExclusion *filter = GST_EXCLUSION (vfilter);
- gint video_size, factor, width, height;
+ gint video_size, factor;
guint32 *src, *dest;
GstClockTime timestamp;
gint64 stream_time;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = GST_VIDEO_FRAME_WIDTH (in_frame);
- height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
/* GstController: update the properties */
timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
stream_time =
factor = filter->factor;
GST_OBJECT_UNLOCK (filter);
- video_size = width * height;
+ video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+ GST_VIDEO_FRAME_HEIGHT (in_frame);
transform (src, dest, video_size, factor);
return GST_FLOW_OK;
/*
* GStreamer
- * Copyright (C) <2010-2012> Luis de Bethencourt <luis@debethencourt.com>
+ * Copyright (C) <2010-2015> Luis de Bethencourt <luis@debethencourt.com>
*
* Solarize - curve adjustment video effect.
* Based on Pete Warden's FreeFrame plugin with the same name.
GstVideoFrame * in_frame, GstVideoFrame * out_frame)
{
GstSolarize *filter = GST_SOLARIZE (vfilter);
- gint video_size, threshold, start, end, width, height;
+ gint video_size, threshold, start, end;
guint32 *src, *dest;
GstClockTime timestamp;
gint64 stream_time;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
- width = GST_VIDEO_FRAME_WIDTH (in_frame);
- height = GST_VIDEO_FRAME_HEIGHT (in_frame);
-
/* GstController: update the properties */
timestamp = GST_BUFFER_TIMESTAMP (in_frame->buffer);
stream_time =
end = filter->end;
GST_OBJECT_UNLOCK (filter);
- video_size = width * height;
+ video_size = GST_VIDEO_FRAME_WIDTH (in_frame) *
+ GST_VIDEO_FRAME_HEIGHT (in_frame);
+
transform (src, dest, video_size, threshold, start, end);
return GST_FLOW_OK;