gaudieffects: removing values only used once

This commit is contained in:
Luis de Bethencourt 2015-03-23 14:39:56 +00:00
parent 110fa9c09c
commit 70cc73fd70
5 changed files with 21 additions and 29 deletions

View file

@ -1,6 +1,6 @@
/*
* 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.
@ -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);

View file

@ -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;

View file

@ -1,6 +1,6 @@
/*
* 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.
@ -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);

View file

@ -1,6 +1,6 @@
/*
* 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.
@ -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;

View file

@ -1,6 +1,6 @@
/*
* 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.
@ -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;