resampler: make offset/phase/n_taps uint32

Make various resizer fields uint32 so that we can use them in ORC
functions later.
This commit is contained in:
Wim Taymans 2014-10-29 13:17:39 +01:00
parent 9591e22fee
commit 28e5ed00de
3 changed files with 13 additions and 13 deletions

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

View 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];

View 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);