-static void draw_sample_cline_rgba(uint8_t *buf, int height, int linesize,
- int16_t *prev_y,
- const uint8_t color[4], int h)
+static void draw_sample_p2p_rgba_full(uint8_t *buf, int height, int linesize,
+ int16_t *prev_y,
+ const uint8_t color[4], int h)
+{
+ int k;
+ if (h >= 0 && h < height) {
+ buf[h * linesize + 0] = color[0];
+ buf[h * linesize + 1] = color[1];
+ buf[h * linesize + 2] = color[2];
+ buf[h * linesize + 3] = color[3];
+ if (*prev_y && h != *prev_y) {
+ int start = *prev_y;
+ int end = av_clip(h, 0, height-1);
+ if (start > end)
+ FFSWAP(int16_t, start, end);
+ for (k = start + 1; k < end; k++) {
+ buf[k * linesize + 0] = color[0];
+ buf[k * linesize + 1] = color[1];
+ buf[k * linesize + 2] = color[2];
+ buf[k * linesize + 3] = color[3];
+ }
+ }
+ }
+ *prev_y = h;
+}
+
+static void draw_sample_cline_rgba_scale(uint8_t *buf, int height, int linesize,
+ int16_t *prev_y,
+ const uint8_t color[4], int h)