Commit 1ac4d378 authored by Andy Wingo Wingo's avatar Andy Wingo Wingo
Browse files

gst/videoscale/vs_image.c (vs_image_scale_nearest_YUYV): Typo ixes a seggie mcfalterson (#310894).

Original commit message from CVS:
2005-07-20  Andy Wingo  <wingo@pobox.com>

* gst/videoscale/vs_image.c (vs_image_scale_nearest_YUYV): Typo
fix (?), fixes a seggie mcfalterson (#310894).
parent 7795794b
2005-07-20 Andy Wingo <wingo@pobox.com>
* gst/videoscale/vs_image.c (vs_image_scale_nearest_YUYV): Typo
fix (?), fixes a seggie mcfalterson (#310894).
2005-07-20 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ogg/gstoggmux.c: (gst_ogg_mux_get_headers),
......
......@@ -149,6 +149,7 @@ static GstCaps *gst_videoscale_transform_caps (GstBaseTransform * trans,
GstPad * pad, GstCaps * caps);
static gboolean gst_videoscale_set_caps (GstBaseTransform * trans,
GstCaps * in, GstCaps * out);
static guint gst_videoscale_get_size (GstBaseTransform * trans);
static GstFlowReturn gst_videoscale_transform (GstBaseTransform * trans,
GstBuffer * in, GstBuffer * out);
......@@ -216,6 +217,7 @@ gst_videoscale_class_init (GstVideoscaleClass * klass)
trans_class->transform_caps = gst_videoscale_transform_caps;
trans_class->set_caps = gst_videoscale_set_caps;
trans_class->get_size = gst_videoscale_get_size;
trans_class->transform = gst_videoscale_transform;
parent_class = g_type_class_peek_parent (klass);
......@@ -418,6 +420,18 @@ gst_videoscale_prepare_sizes (GstVideoscale * videoscale, VSImage * src,
return size;
}
static guint
gst_videoscale_get_size (GstBaseTransform * trans)
{
GstVideoscale *videoscale;
VSImage dest;
VSImage src;
videoscale = GST_VIDEOSCALE (trans);
return (guint) gst_videoscale_prepare_sizes (videoscale, &src, &dest, TRUE);
}
static void
gst_videoscale_prepare_images (GstVideoscale * videoscale, GstBuffer * in,
GstBuffer * out, VSImage * src, VSImage * src_u, VSImage * src_v,
......@@ -475,9 +489,6 @@ gst_videoscale_transform (GstBaseTransform * trans, GstBuffer * in,
gst_buffer_stamp (out, in);
/* output size could have changed, prepare again */
gst_videoscale_prepare_sizes (videoscale, &src, &dest, FALSE);
gst_videoscale_prepare_images (videoscale, in, out, &src, &src_u, &src_v,
&dest, &dest_u, &dest_v);
......
......@@ -284,7 +284,7 @@ vs_image_scale_nearest_YUYV (const VSImage * dest, const VSImage * src,
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
x_increment = ((src->width - 1) << 16) / (dest->width - 1);
n_quads = ROUND_UP_2 (dest->width);
n_quads = ROUND_UP_2 (dest->width) / 2;
acc = 0;
for (i = 0; i < dest->height; i++) {
j = acc >> 16;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment