#endif
static void
-videotestsrc_blend_line (GstVideoTestSrc * v, guint8 * dest, guint8 * src,
- struct vts_color_struct *a, struct vts_color_struct *b, int n)
+videotestsrc_blend_line (GstVideoTestSrc * v, guint8 * dest,
+ const guint8 * src, const struct vts_color_struct *a,
+ const struct vts_color_struct *b, int x1, int x2)
{
int i;
if (v->bayer || GST_VIDEO_INFO_IS_RGB (&v->info)) {
- for (i = 0; i < n; i++) {
+ for (i = x1; i < x2; i++) {
dest[i * 4 + 0] = BLEND (a->A, b->A, src[i]);
dest[i * 4 + 1] = BLEND (a->R, b->R, src[i]);
dest[i * 4 + 2] = BLEND (a->G, b->G, src[i]);
dest[i * 4 + 3] = BLEND (a->B, b->B, src[i]);
}
} else {
- for (i = 0; i < n; i++) {
+ for (i = x1; i < x2; i++) {
dest[i * 4 + 0] = BLEND (a->A, b->A, src[i]);
dest[i * 4 + 1] = BLEND (a->Y, b->Y, src[i]);
dest[i * 4 + 2] = BLEND (a->U, b->U, src[i]);
int y = random_char (&v->random_state);
p->tmpline_u8[i] = y;
}
- videotestsrc_blend_line (v, p->tmpline + x1 * 4, p->tmpline_u8 + x1,
- &p->foreground_color, &p->background_color, w - x1);
+ videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
+ &p->foreground_color, &p->background_color, x1, w);
}
videotestsrc_convert_tmpline (p, frame, j);
p->tmpline_u8[i] = y;
}
videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
- &p->foreground_color, &p->background_color, w);
+ &p->foreground_color, &p->background_color, 0, w);
videotestsrc_convert_tmpline (p, frame, j);
}
}
p->tmpline_u8[i] = sine_table[phase & 0xff];
}
videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
- &p->foreground_color, &p->background_color, w);
+ &p->foreground_color, &p->background_color, 0, w);
videotestsrc_convert_tmpline (p, frame, j);
}
}
}
}
videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
- &p->foreground_color, &p->background_color, w);
+ &p->foreground_color, &p->background_color, 0, w);
videotestsrc_convert_tmpline (p, frame, j);
}
}
}
videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
- foreground_color, background_color, w);
+ foreground_color, background_color, 0, w);
videotestsrc_convert_tmpline (p, frame, i);
}
p->tmpline_u8[i] = 255;
}
videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
- foreground_color, background_color, w);
+ foreground_color, background_color, 0, w);
videotestsrc_convert_tmpline (p, frame, h / 2);
videotestsrc_convert_tmpline (p, frame, y);
}
p->tmpline_u8[i] = CLAMP (rint (v * 128 + 128), 0, 255);
}
videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
- &p->foreground_color, &p->background_color, w);
+ &p->foreground_color, &p->background_color, 0, w);
videotestsrc_convert_tmpline (p, frame, j);
}
}
p->tmpline_u8[i] = CLAMP (rint (v * 255), 0, 255);
}
videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
- &p->foreground_color, &p->background_color, w);
+ &p->foreground_color, &p->background_color, 0, w);
videotestsrc_convert_tmpline (p, frame, j);
}
}
p->tmpline_u8[i] = y;
}
videotestsrc_blend_line (v, p->tmpline, p->tmpline_u8,
- &p->foreground_color, &p->background_color, w);
+ &p->foreground_color, &p->background_color, 0, w);
videotestsrc_convert_tmpline (p, frame, j);
}
}