From 84176843c170e7e70fe077730de2596df1874620 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 29 Oct 2014 16:13:02 +0100 Subject: [PATCH] video-scaler: add precision to make_s16_taps --- gst-libs/gst/video/video-scaler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/video/video-scaler.c b/gst-libs/gst/video/video-scaler.c index d1321b7..7776864 100644 --- a/gst-libs/gst/video/video-scaler.c +++ b/gst-libs/gst/video/video-scaler.c @@ -245,7 +245,7 @@ resampler_convert_coeff (const gdouble * src, } static void -make_s16_taps (GstVideoScaler * scale) +make_s16_taps (GstVideoScaler * scale, gint precision) { gint i, max_taps, n_phases; gint16 *taps_s16; @@ -258,7 +258,7 @@ make_s16_taps (GstVideoScaler * scale) taps_s16 = scale->taps_s16 = g_malloc (sizeof (gint16) * n_phases * max_taps); for (i = 0; i < n_phases; i++) { - resampler_convert_coeff (taps, taps_s16, max_taps, 16, S16_SCALE); + resampler_convert_coeff (taps, taps_s16, max_taps, 16, precision); taps += max_taps; taps_s16 += max_taps; @@ -299,7 +299,7 @@ video_scale_h_ntap_8888 (GstVideoScaler * scale, guint32 *offset, *phase; if (scale->taps_s16 == NULL) - make_s16_taps (scale); + make_s16_taps (scale, S16_SCALE); max_taps = scale->resampler.max_taps; offset = scale->resampler.offset + dest_offset; @@ -339,7 +339,7 @@ video_scale_v_ntap_8888 (GstVideoScaler * scale, guint8 *s, *d; if (scale->taps_s16 == NULL) - make_s16_taps (scale); + make_s16_taps (scale, S16_SCALE); max_taps = scale->resampler.max_taps; t = scale->taps_s16 + (scale->resampler.phase[dest_offset] * max_taps); -- 2.7.4