+ p[0] = 255; p[1] = 255; p[2] = 255; p[3] = 255;
+ }
+}
+
+void
+VideoImageFrame::fill_frame (const uint8_t r, const uint8_t g, const uint8_t b)
+{
+ const int rowstride = img->stride;
+ const int clip_height = img->height;
+ const int clip_width = img->width;
+ uint8_t *pixels, *p;
+ pixels = img->data;
+
+ int x,y;
+ for (y = 0; y < clip_height; ++y) {
+ for (x = 0; x < clip_width; ++x) {
+ p = pixels + y * rowstride + x * 4;
+ p[0] = b; p[1] = g; p[2] = r; p[3] = 255;
+ }
+ }
+}
+
+void
+VideoImageFrame::draw_x ()
+{
+ int x,y;
+ const int rowstride = img->stride;
+ const int clip_width = img->width;
+ const int clip_height = img->height;
+ uint8_t *pixels, *p;
+ pixels = img->data;
+
+ for (x = 0;x < clip_width; x++) {
+ y = clip_height * x / clip_width;
+ p = pixels + y * rowstride + x * 4;
+ p[0] = 192; p[1] = 192; p[2] = 192; p[3] = 255;
+ p = pixels + y * rowstride + (clip_width-x-1) * 4;
+ p[0] = 192; p[1] = 192; p[2] = 192; p[3] = 255;