diff --git a/gst/gaudieffects/gstburn.c b/gst/gaudieffects/gstburn.c index eb4b0c50c7..940fdbbdad 100644 --- a/gst/gaudieffects/gstburn.c +++ b/gst/gaudieffects/gstburn.c @@ -1,6 +1,6 @@ /* * GStreamer - * Copyright (C) >2010-2012> Luis de Bethencourt + * Copyright (C) <2010-2015> Luis de Bethencourt * * Burn - curve adjustment video effect. * Based on Pete Warden's FreeFrame plugin with the same name. @@ -226,7 +226,7 @@ gst_burn_transform_frame (GstVideoFilter * vfilter, 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; @@ -234,10 +234,8 @@ gst_burn_transform_frame (GstVideoFilter * vfilter, 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); diff --git a/gst/gaudieffects/gstchromium.c b/gst/gaudieffects/gstchromium.c index d3c9780446..2fbd622108 100644 --- a/gst/gaudieffects/gstchromium.c +++ b/gst/gaudieffects/gstchromium.c @@ -255,7 +255,7 @@ gst_chromium_transform_frame (GstVideoFilter * vfilter, 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; @@ -263,9 +263,6 @@ gst_chromium_transform_frame (GstVideoFilter * vfilter, 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 = @@ -283,7 +280,8 @@ gst_chromium_transform_frame (GstVideoFilter * vfilter, 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; diff --git a/gst/gaudieffects/gstdodge.c b/gst/gaudieffects/gstdodge.c index efe8be18bd..0efacd4469 100644 --- a/gst/gaudieffects/gstdodge.c +++ b/gst/gaudieffects/gstdodge.c @@ -1,6 +1,6 @@ /* * GStreamer - * Copyright (C) <2010-2012> Luis de Bethencourt + * Copyright (C) <2010-2015> Luis de Bethencourt * * Dodge - saturation video effect. * Based on Pete Warden's FreeFrame plugin with the same name. @@ -213,7 +213,7 @@ gst_dodge_transform_frame (GstVideoFilter * vfilter, { GstDodge *filter = GST_DODGE (vfilter); guint32 *src, *dest; - gint video_size, width, height; + gint video_size; GstClockTime timestamp; gint64 stream_time; @@ -221,9 +221,7 @@ gst_dodge_transform_frame (GstVideoFilter * vfilter, 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, @@ -235,7 +233,8 @@ gst_dodge_transform_frame (GstVideoFilter * vfilter, 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); diff --git a/gst/gaudieffects/gstexclusion.c b/gst/gaudieffects/gstexclusion.c index 240bf41e9d..235594ca2a 100644 --- a/gst/gaudieffects/gstexclusion.c +++ b/gst/gaudieffects/gstexclusion.c @@ -1,6 +1,6 @@ /* * GStreamer - * Copyright (C) <2010-2012> Luis de Bethencourt + * Copyright (C) <2010-2015> Luis de Bethencourt * * Exclusion - color exclusion video effect. * Based on Pete Warden's FreeFrame plugin with the same name. @@ -229,7 +229,7 @@ gst_exclusion_transform_frame (GstVideoFilter * vfilter, 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; @@ -237,9 +237,6 @@ gst_exclusion_transform_frame (GstVideoFilter * vfilter, 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 = @@ -256,7 +253,8 @@ gst_exclusion_transform_frame (GstVideoFilter * vfilter, 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; diff --git a/gst/gaudieffects/gstsolarize.c b/gst/gaudieffects/gstsolarize.c index 932c6ccfad..68c8baa4f0 100644 --- a/gst/gaudieffects/gstsolarize.c +++ b/gst/gaudieffects/gstsolarize.c @@ -1,6 +1,6 @@ /* * GStreamer - * Copyright (C) <2010-2012> Luis de Bethencourt + * Copyright (C) <2010-2015> Luis de Bethencourt * * Solarize - curve adjustment video effect. * Based on Pete Warden's FreeFrame plugin with the same name. @@ -256,7 +256,7 @@ gst_solarize_transform_frame (GstVideoFilter * vfilter, 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; @@ -264,9 +264,6 @@ gst_solarize_transform_frame (GstVideoFilter * vfilter, 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 = @@ -285,7 +282,9 @@ gst_solarize_transform_frame (GstVideoFilter * vfilter, 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;