resampler: make offset/phase/n_taps uint32
authorWim Taymans <wtaymans@redhat.com>
Wed, 29 Oct 2014 12:17:39 +0000 (13:17 +0100)
committerWim Taymans <wtaymans@redhat.com>
Wed, 29 Oct 2014 15:26:19 +0000 (16:26 +0100)
Make various resizer fields uint32 so that we can use them in ORC
functions later.

gst-libs/gst/video/resampler.c
gst-libs/gst/video/resampler.h
gst-libs/gst/video/video-scaler.c

index c537f78..04475cc 100644 (file)
@@ -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;
index 1d525d2..d9db20d 100644 (file)
@@ -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];
index 42d0870..d1321b7 100644 (file)
@@ -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);