mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
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).
This commit is contained in:
parent
7795794bf0
commit
1ac4d378eb
3 changed files with 20 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue