static void paint_setup_UYVY (paintinfo * p, char *dest);
static void paint_setup_YVYU (paintinfo * p, char *dest);
static void paint_setup_IYU2 (paintinfo * p, char *dest);
+static void paint_setup_Y41B (paintinfo * p, char *dest);
+static void paint_setup_Y42B (paintinfo * p, char *dest);
static void paint_setup_Y800 (paintinfo * p, char *dest);
#if 0
static void paint_hline_I420 (paintinfo * p, int x, int y, int w);
static void paint_hline_YUY2 (paintinfo * p, int x, int y, int w);
static void paint_hline_IYU2 (paintinfo * p, int x, int y, int w);
+static void paint_hline_Y41B (paintinfo * p, int x, int y, int w);
+static void paint_hline_Y42B (paintinfo * p, int x, int y, int w);
static void paint_hline_Y800 (paintinfo * p, int x, int y, int w);
#if 0
#endif
/* CLPL */
/* Y41B */
+ {"Y41B", "Y41B", 12, paint_setup_Y41B, paint_hline_Y41B},
/* Y42B */
+ {"Y42B", "Y42B", 16, paint_setup_Y42B, paint_hline_Y42B},
/* Y800 grayscale */
{"Y800", "Y800", 8, paint_setup_Y800, paint_hline_Y800},
}
static void
+paint_setup_Y41B (paintinfo * p, char *dest)
+{
+ p->yp = dest;
+ p->ystride = ROUND_UP_4 (p->width);
+ p->up = p->yp + p->ystride * p->height;
+ p->ustride = ROUND_UP_8 (p->width) / 4;
+ p->vp = p->up + p->ustride * p->height;
+ p->vstride = ROUND_UP_8 (p->width) / 4;
+ p->endptr = p->vp + p->vstride * p->height;
+}
+
+static void
+paint_hline_Y41B (paintinfo * p, int x, int y, int w)
+{
+ int x1 = x / 4;
+ int x2 = (x + w) / 4;
+ int offset = y * p->ystride;
+ int offset1 = y * p->ustride;
+
+ memset (p->yp + offset + x, p->color->Y, w);
+ memset (p->up + offset1 + x1, p->color->U, x2 - x1);
+ memset (p->vp + offset1 + x1, p->color->V, x2 - x1);
+}
+
+static void
+paint_setup_Y42B (paintinfo * p, char *dest)
+{
+ p->yp = dest;
+ p->ystride = ROUND_UP_4 (p->width);
+ p->up = p->yp + p->ystride * p->height;
+ p->ustride = ROUND_UP_8 (p->width) / 2;
+ p->vp = p->up + p->ustride * p->height;
+ p->vstride = ROUND_UP_8 (p->width) / 2;
+ p->endptr = p->vp + p->vstride * p->height;
+}
+
+static void
+paint_hline_Y42B (paintinfo * p, int x, int y, int w)
+{
+ int x1 = x / 2;
+ int x2 = (x + w) / 2;
+ int offset = y * p->ystride;
+ int offset1 = y * p->ustride;
+
+ memset (p->yp + offset + x, p->color->Y, w);
+ memset (p->up + offset1 + x1, p->color->U, x2 - x1);
+ memset (p->vp + offset1 + x1, p->color->V, x2 - x1);
+}
+
+static void
paint_setup_Y800 (paintinfo * p, char *dest)
{
/* untested */