const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
+ guint8 *y_line = GET_Y_LINE (y);
+ guint8 *u_line = GET_U_LINE (uv);
+ guint8 *v_line = GET_V_LINE (uv);
+ guint8 *ayuv = dest;
+
+ video_orc_unpack_I420 (dest, y_line, u_line, v_line, width);
+
+ if (width & 1) {
+ gint i = width - 1;
- video_orc_unpack_I420 (dest, GET_Y_LINE (y), GET_U_LINE (uv),
- GET_V_LINE (uv), width);
+ ayuv[i * 4 + 2] = u_line[i / 2 + 1];
+ ayuv[i * 4 + 3] = v_line[i / 2 + 1];
+ }
}
static void
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- video_orc_unpack_YUY2 (dest, GET_LINE (y), width / 2);
+ guint8 *line = GET_LINE (y);
+ guint8 *d = dest;
+
+ video_orc_unpack_YUY2 (dest, line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
+
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = line[i * 2 + 0];
+ d[i * 4 + 2] = line[i * 2 + 1];
+ d[i * 4 + 3] = line[i * 2 + 3];
+ }
}
static void
line[i * 2 + 0] = ayuv[i * 4 + 1];
line[i * 2 + 1] = ayuv[i * 4 + 2];
- line[i * 2 + 2] = ayuv[i * 4 + 1];
line[i * 2 + 3] = ayuv[i * 4 + 3];
}
}
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- video_orc_unpack_UYVY (dest, GET_LINE (y), width / 2);
+ guint8 *line = GET_LINE (y);
+ guint8 *d = dest;
+
+ video_orc_unpack_UYVY (dest, line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
+
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = line[i * 2 + 1];
+ d[i * 4 + 2] = line[i * 2 + 0];
+ d[i * 4 + 3] = line[i * 2 + 2];
+ }
}
static void
line[i * 2 + 0] = ayuv[i * 4 + 2];
line[i * 2 + 1] = ayuv[i * 4 + 1];
line[i * 2 + 2] = ayuv[i * 4 + 3];
- line[i * 2 + 3] = ayuv[i * 4 + 1];
}
}
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- video_orc_unpack_YVYU (dest, GET_LINE (y), width / 2);
+ guint8 *line = GET_LINE (y);
+ guint8 *d = dest;
+
+ video_orc_unpack_YVYU (dest, line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
+
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = line[i * 2 + 0];
+ d[i * 4 + 2] = line[i * 2 + 3];
+ d[i * 4 + 3] = line[i * 2 + 1];
+ }
}
static void
line[i * 2 + 0] = ayuv[i * 4 + 1];
line[i * 2 + 1] = ayuv[i * 4 + 3];
- line[i * 2 + 2] = ayuv[i * 4 + 1];
line[i * 2 + 3] = ayuv[i * 4 + 2];
}
}
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- video_orc_unpack_YUV9 (dest,
- GET_Y_LINE (y), GET_U_LINE (y), GET_V_LINE (y), width / 2);
+ guint8 *y_line = GET_Y_LINE (y);
+ guint8 *u_line = GET_U_LINE (y);
+ guint8 *v_line = GET_V_LINE (y);
+ guint8 *d = dest;
+
+ video_orc_unpack_YUV9 (dest, y_line, u_line, v_line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
+
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = y_line[i];
+ d[i * 4 + 2] = u_line[i >> 2];
+ d[i * 4 + 3] = v_line[i >> 2];
+ }
}
static void
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- video_orc_unpack_Y42B (dest,
- GET_Y_LINE (y), GET_U_LINE (y), GET_V_LINE (y), width / 2);
+ guint8 *y_line = GET_Y_LINE (y);
+ guint8 *u_line = GET_U_LINE (y);
+ guint8 *v_line = GET_V_LINE (y);
+ guint8 *d = dest;
+
+ video_orc_unpack_Y42B (dest, y_line, u_line, v_line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
+
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = y_line[i];
+ d[i * 4 + 2] = u_line[i / 2 + 1];
+ d[i * 4 + 3] = v_line[i / 2 + 1];
+ }
}
static void
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
+ guint8 *y_line = GET_PLANE_LINE (0, y);
+ guint8 *uv_line = GET_PLANE_LINE (1, uv);
+ guint8 *d = dest;
- video_orc_unpack_NV12 (dest,
- GET_PLANE_LINE (0, y), GET_PLANE_LINE (1, uv), width / 2);
+ video_orc_unpack_NV12 (dest, y_line, uv_line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
+
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = y_line[i];
+ d[i * 4 + 2] = uv_line[i + 0];
+ d[i * 4 + 3] = uv_line[i + 1];
+ }
}
static void
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_420 (y, flags);
+ guint8 *y_line = GET_PLANE_LINE (0, y);
+ guint8 *uv_line = GET_PLANE_LINE (1, uv);
+ guint8 *d = dest;
+
+ video_orc_unpack_NV21 (dest, y_line, uv_line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
- video_orc_unpack_NV21 (dest,
- GET_PLANE_LINE (0, y), GET_PLANE_LINE (1, uv), width / 2);
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = y_line[i];
+ d[i * 4 + 2] = uv_line[i + 1];
+ d[i * 4 + 3] = uv_line[i + 0];
+ }
}
static void
gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
- video_orc_unpack_NV12 (dest,
- GET_PLANE_LINE (0, y), GET_PLANE_LINE (1, y), width / 2);
+ guint8 *y_line = GET_PLANE_LINE (0, y);
+ guint8 *uv_line = GET_PLANE_LINE (1, y);
+ guint8 *d = dest;
+
+ video_orc_unpack_NV12 (dest, y_line, uv_line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
+
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = y_line[i];
+ d[i * 4 + 2] = uv_line[i + 0];
+ d[i * 4 + 3] = uv_line[i + 1];
+ }
}
static void
const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
{
gint uv = GET_UV_410 (y, flags);
+ guint8 *y_line = GET_Y_LINE (y);
+ guint8 *u_line = GET_U_LINE (uv);
+ guint8 *v_line = GET_V_LINE (uv);
+ guint8 *d = dest;
- video_orc_unpack_YUV9 (dest,
- GET_Y_LINE (y), GET_U_LINE (uv), GET_V_LINE (uv), width / 2);
+ video_orc_unpack_YUV9 (dest, y_line, u_line, v_line, width / 2);
+
+ if (width & 1) {
+ gint i = width - 1;
+
+ d[i * 4 + 0] = 0xff;
+ d[i * 4 + 1] = y_line[i];
+ d[i * 4 + 2] = u_line[i >> 2];
+ d[i * 4 + 3] = v_line[i >> 2];
+ }
}
static void