GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";"
- GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_YUV ("{I420, UYUV, NV12, NV21}"))
+ GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_YUV ("{I420, UYVY, NV12, NV21}"))
);
static GstStaticPadTemplate video_sink_template_factory =
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_BGRx ";"
- GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_YUV ("{I420, UYUV, NV12, NV21}"))
+ GST_VIDEO_CAPS_xRGB ";" GST_VIDEO_CAPS_YUV ("{I420, UYVY, NV12, NV21}"))
);
static GstStaticPadTemplate text_sink_template_factory =
int u_offset, v_offset;
int h, w;
+ /* because U/V is 2x2 subsampled, we need to round, either up or down,
+ * to a boundary of integer number of U/V pixels:
+ */
+ xpos = GST_ROUND_UP_2 (xpos);
+ ypos = GST_ROUND_UP_2 (ypos);
+
w = overlay->width;
h = overlay->height;
int u_offset, v_offset;
int h, w;
+ /* because U/V is 2x2 subsampled, we need to round, either up or down,
+ * to a boundary of integer number of U/V pixels:
+ */
+ xpos = GST_ROUND_UP_2 (xpos);
+ ypos = GST_ROUND_UP_2 (ypos);
+
w = overlay->width;
h = overlay->height;
int h, w;
guchar *pimage, *dest;
+ /* because U/V is 2x horizontally subsampled, we need to round to a
+ * boundary of integer number of U/V pixels in x dimension:
+ */
+ xpos = GST_ROUND_UP_2 (xpos);
+
w = overlay->image_width - 2;
h = overlay->image_height - 2;