summaryrefslogtreecommitdiff
path: root/gst/dvdspu/gstdvdspu-render.c
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2011-12-26 22:04:04 -0600
committerJan Schmidt <thaytan@noraisin.net>2012-10-03 03:35:51 +1000
commit4dc648d3430b67592cf1413ccef415f70889d71e (patch)
tree46705ddfb78b78ef68f97a96ab6de5ec38242ff8 /gst/dvdspu/gstdvdspu-render.c
parent6e4a9e2e243e7d7133f310b254f70aa9d355c1e6 (diff)
downloadgstreamer-plugins-bad-4dc648d3430b67592cf1413ccef415f70889d71e.tar.gz
dvdspu: add YV12 and NV12 support
https://bugzilla.gnome.org/show_bug.cgi?id=667220 Conflicts: gst/dvdspu/gstdvdspu.c gst/dvdspu/gstdvdspu.h gst/dvdspu/gstspu-pgs.c gst/dvdspu/gstspu-vobsub-render.c
Diffstat (limited to 'gst/dvdspu/gstdvdspu-render.c')
-rw-r--r--gst/dvdspu/gstdvdspu-render.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gst/dvdspu/gstdvdspu-render.c b/gst/dvdspu/gstdvdspu-render.c
index 7731aed41..f303fa1a3 100644
--- a/gst/dvdspu/gstdvdspu-render.c
+++ b/gst/dvdspu/gstdvdspu-render.c
@@ -85,10 +85,13 @@ gstspu_blend_comp_buffers (SpuState * state, guint8 * planes[3])
* inverse alpha is (4 * 0xff) - in_A[x] */
guint16 inv_A = (4 * 0xff) - in_A[x];
- tmp = in_U[x] + inv_A * out_U[x];
- out_U[x] = (guint8) (tmp / (4 * 0xff));
+ tmp = in_U[x] + inv_A * *out_U;
+ *out_U = (guint8) (tmp / (4 * 0xff));
- tmp = in_V[x] + inv_A * out_V[x];
- out_V[x] = (guint8) (tmp / (4 * 0xff));
+ tmp = in_V[x] + inv_A * *out_V;
+ *out_V = (guint8) (tmp / (4 * 0xff));
+
+ out_U += GST_VIDEO_INFO_COMP_PSTRIDE (&state->info, 1);
+ out_V += GST_VIDEO_INFO_COMP_PSTRIDE (&state->info, 2);
}
}