diff --git a/gst/dvdspu/gstdvdspu-render.c b/gst/dvdspu/gstdvdspu-render.c index 7731aed41f..f303fa1a39 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); } } diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 94b307e4e3..b64cbd3a79 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -61,17 +61,15 @@ static GstStaticPadTemplate video_sink_factory = GST_STATIC_PAD_TEMPLATE ("video", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-raw, " "format = (string) { I420 }, " + GST_STATIC_CAPS ("video/x-raw, " "format = (string) { I420, NV12, YV12 }, " "width = (int) [ 16, 4096 ], " "height = (int) [ 16, 4096 ]") - /* FIXME: Can support YV12 one day too */ ); static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-raw, " "format = (string) { I420 }, " + GST_STATIC_CAPS ("video/x-raw, " "format = (string) { I420, NV12, YV12 }, " "width = (int) [ 16, 4096 ], " "height = (int) [ 16, 4096 ]") - /* FIXME: Can support YV12 one day too */ ); static GstStaticPadTemplate subpic_sink_factory =