From bb6b518506d73120c98ca7e7311456148bfbe542 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 17 Dec 2018 09:21:57 +0100 Subject: [PATCH] video-converter: Remove unused variable/calculation Since the refactoring in cdd86d025a7c2e1c00e7a86731168793e6104276 calculating the stride was no longer needed in setup_scale. --- gst-libs/gst/video/video-converter.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c index e8de86ce8f..4faf75078e 100644 --- a/gst-libs/gst/video/video-converter.c +++ b/gst-libs/gst/video/video-converter.c @@ -5914,7 +5914,7 @@ static gboolean setup_scale (GstVideoConverter * convert) { int i, n_planes; - gint method, cr_method, stride, in_width, in_height, out_width, out_height; + gint method, cr_method, in_width, in_height, out_width, out_height; guint taps; GstVideoInfo *in_info, *out_info; const GstVideoFormatInfo *in_finfo, *out_finfo; @@ -5964,8 +5964,6 @@ setup_scale (GstVideoConverter * convert) out_width = convert->out_width; out_height = convert->out_height; - stride = 0; - if (n_planes == 1 && !GST_VIDEO_FORMAT_INFO_IS_GRAY (out_finfo)) { gint pstride; guint j; @@ -6020,9 +6018,6 @@ setup_scale (GstVideoConverter * convert) convert->fout_x[0] = convert->out_x * pstride; } - stride = MAX (stride, GST_VIDEO_INFO_PLANE_STRIDE (in_info, 0)); - stride = MAX (stride, GST_VIDEO_INFO_PLANE_STRIDE (out_info, 0)); - if (in_height != out_height && in_height != 0 && out_height != 0) { convert->fv_scaler[0].scaler = g_new (GstVideoScaler *, n_threads); @@ -6061,9 +6056,6 @@ setup_scale (GstVideoConverter * convert) } } - stride = MAX (stride, GST_VIDEO_INFO_COMP_STRIDE (in_info, i)); - stride = MAX (stride, GST_VIDEO_INFO_COMP_STRIDE (out_info, i)); - iw = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (in_finfo, i, in_width); ih = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (in_finfo, i, in_height); ow = GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (out_finfo, i, out_width);