mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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
This commit is contained in:
parent
6e4a9e2e24
commit
4dc648d343
2 changed files with 9 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue