From: Wim Taymans Date: Wed, 29 Oct 2014 12:17:39 +0000 (+0100) Subject: resampler: make offset/phase/n_taps uint32 X-Git-Tag: 1.6.0~912 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28e5ed00de978fe0f2cd1693684ee92ff5c4585e;p=platform%2Fupstream%2Fgst-plugins-base.git resampler: make offset/phase/n_taps uint32 Make various resizer fields uint32 so that we can use them in ORC functions later. --- diff --git a/gst-libs/gst/video/resampler.c b/gst-libs/gst/video/resampler.c index c537f78..04475cc 100644 --- a/gst-libs/gst/video/resampler.c +++ b/gst-libs/gst/video/resampler.c @@ -154,7 +154,7 @@ resampler_calculate_taps (ResamplerParams * params) { GstResampler *resampler = params->resampler; gint j; - guint *offset, *n_taps, *phase; + guint32 *offset, *n_taps, *phase; gint tap_offs; gint max_taps; gint in_size, out_size; @@ -171,9 +171,9 @@ resampler_calculate_taps (ResamplerParams * params) shift = params->shift; resampler->taps = g_malloc (sizeof (gdouble) * max_taps * out_size); - n_taps = resampler->n_taps = g_malloc (sizeof (guint) * out_size); - offset = resampler->offset = g_malloc (sizeof (guint) * out_size); - phase = resampler->phase = g_malloc (sizeof (guint) * out_size); + n_taps = resampler->n_taps = g_malloc (sizeof (guint32) * out_size); + offset = resampler->offset = g_malloc (sizeof (guint32) * out_size); + phase = resampler->phase = g_malloc (sizeof (guint32) * out_size); for (j = 0; j < out_size; j++) { gdouble ox, x; diff --git a/gst-libs/gst/video/resampler.h b/gst-libs/gst/video/resampler.h index 1d525d2..d9db20d 100644 --- a/gst-libs/gst/video/resampler.h +++ b/gst-libs/gst/video/resampler.h @@ -139,9 +139,9 @@ struct _GstResampler gint out_size; guint max_taps; guint n_phases; - guint *offset; - guint *phase; - guint *n_taps; + guint32 *offset; + guint32 *phase; + guint32 *n_taps; gdouble *taps; gpointer _gst_reserved[GST_PADDING]; diff --git a/gst-libs/gst/video/video-scaler.c b/gst-libs/gst/video/video-scaler.c index 42d0870..d1321b7 100644 --- a/gst-libs/gst/video/video-scaler.c +++ b/gst-libs/gst/video/video-scaler.c @@ -53,14 +53,14 @@ resampler_zip (GstResampler * resampler, const GstResampler * r1, { guint i, out_size, max_taps; gdouble *taps; - guint *offset, *phase; + guint32 *offset, *phase; g_return_if_fail (r1->max_taps == r2->max_taps); out_size = r1->out_size + r2->out_size; max_taps = r1->max_taps; - offset = g_malloc (sizeof (guint) * out_size); - phase = g_malloc (sizeof (guint) * out_size); + offset = g_malloc (sizeof (guint32) * out_size); + phase = g_malloc (sizeof (guint32) * out_size); taps = g_malloc (sizeof (gdouble) * max_taps * out_size); resampler->in_size = r1->in_size + r2->in_size; @@ -68,7 +68,7 @@ resampler_zip (GstResampler * resampler, const GstResampler * r1, resampler->max_taps = max_taps; resampler->offset = offset; resampler->phase = phase; - resampler->n_taps = g_malloc (sizeof (guint) * out_size); + resampler->n_taps = g_malloc (sizeof (guint32) * out_size); resampler->taps = taps; for (i = 0; i < out_size; i++) { @@ -271,7 +271,7 @@ video_scale_h_near_8888 (GstVideoScaler * scale, { gint i; guint32 *s, *d; - guint *offset; + guint32 *offset; offset = scale->resampler.offset + dest_offset; @@ -296,7 +296,7 @@ video_scale_h_ntap_8888 (GstVideoScaler * scale, gint16 *taps, *t; gint i, j, max_taps, sum0, sum1, sum2, sum3; guint8 *s, *d; - guint *offset, *phase; + guint32 *offset, *phase; if (scale->taps_s16 == NULL) make_s16_taps (scale);