static void test2_fill_picture(AVFilterContext *ctx, AVFrame *frame)

{

    TestSourceContext *s = ctx->priv;

    FFDrawColor color;

    unsigned alpha = (uint32_t)s->alpha << 24;



    /* colored background */

    {

        unsigned i, x = 0, x2;



        x = 0;

        for (i = 1; i < 7; i++) {

            x2 = av_rescale(i, s->w, 6);

            x2 = ff_draw_round_to_sub(&s->draw, 0, 0, x2);

            set_color(s, &color, ((i & 1) ? 0xFF0000 : 0) |

                                 ((i & 2) ? 0x00FF00 : 0) |

                                 ((i & 4) ? 0x0000FF : 0) |

                                 alpha);

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              x, 0, x2 - x, frame->height);

            x = x2;

        }

    }



    /* oblique gradient */

    /* note: too slow if using blending */

    if (s->h >= 64) {

        unsigned x, dx, y0, y, g0, g;



        dx = ff_draw_round_to_sub(&s->draw, 0, +1, 1);

        y0 = av_rescale_q(s->pts, s->time_base, av_make_q(2, s->h - 16));

        g0 = av_rescale_q(s->pts, s->time_base, av_make_q(1, 128));

        for (x = 0; x < s->w; x += dx) {

            g = (av_rescale(x, 6 * 256, s->w) + g0) % (6 * 256);

            set_color(s, &color, color_gradient(g) | alpha);

            y = y0 + av_rescale(x, s->h / 2, s->w);

            y %= 2 * (s->h - 16);

            if (y > s->h - 16)

                y = 2 * (s->h - 16) - y;

            y = ff_draw_round_to_sub(&s->draw, 1, 0, y);

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              x, y, dx, 16);

        }

    }



    /* top right: draw clock hands */

    if (s->w >= 64 && s->h >= 64) {

        int l = (FFMIN(s->w, s->h) - 32) >> 1;

        int steps = FFMAX(4, l >> 5);

        int xc = (s->w >> 2) + (s->w >> 1);

        int yc = (s->h >> 2);

        int cycle = l << 2;

        int pos, xh, yh;

        int c, i;



        for (c = 0; c < 3; c++) {

            set_color(s, &color, (0xBBBBBB ^ (0xFF << (c << 3))) | alpha);

            pos = av_rescale_q(s->pts, s->time_base, av_make_q(64 >> (c << 1), cycle)) % cycle;

            xh = pos < 1 * l ? pos :

                 pos < 2 * l ? l :

                 pos < 3 * l ? 3 * l - pos : 0;

            yh = pos < 1 * l ? 0 :

                 pos < 2 * l ? pos - l :

                 pos < 3 * l ? l :

                               cycle - pos;

            xh -= l >> 1;

            yh -= l >> 1;

            for (i = 1; i <= steps; i++) {

                int x = av_rescale(xh, i, steps) + xc;

                int y = av_rescale(yh, i, steps) + yc;

                x = ff_draw_round_to_sub(&s->draw, 0, -1, x);

                y = ff_draw_round_to_sub(&s->draw, 1, -1, y);

                ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                                  x, y, 8, 8);

            }

        }

    }



    /* bottom left: beating rectangles */

    if (s->w >= 64 && s->h >= 64) {

        int l = (FFMIN(s->w, s->h) - 16) >> 2;

        int cycle = l << 3;

        int xc = (s->w >> 2);

        int yc = (s->h >> 2) + (s->h >> 1);

        int xm1 = ff_draw_round_to_sub(&s->draw, 0, -1, xc - 8);

        int xm2 = ff_draw_round_to_sub(&s->draw, 0, +1, xc + 8);

        int ym1 = ff_draw_round_to_sub(&s->draw, 1, -1, yc - 8);

        int ym2 = ff_draw_round_to_sub(&s->draw, 1, +1, yc + 8);

        int size, step, x1, x2, y1, y2;



        size = av_rescale_q(s->pts, s->time_base, av_make_q(4, cycle));

        step = size / l;

        size %= l;

        if (step & 1)

            size = l - size;

        step = (step >> 1) & 3;

        set_color(s, &color, 0xFF808080);

        x1 = ff_draw_round_to_sub(&s->draw, 0, -1, xc - 4 - size);

        x2 = ff_draw_round_to_sub(&s->draw, 0, +1, xc + 4 + size);

        y1 = ff_draw_round_to_sub(&s->draw, 1, -1, yc - 4 - size);

        y2 = ff_draw_round_to_sub(&s->draw, 1, +1, yc + 4 + size);

        if (step == 0 || step == 2)

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              x1, ym1, x2 - x1, ym2 - ym1);

        if (step == 1 || step == 2)

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              xm1, y1, xm2 - xm1, y2 - y1);

        if (step == 3)

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              x1, y1, x2 - x1, y2 - y1);

    }



    /* bottom right: checker with random noise */

    {

        unsigned xmin = av_rescale(5, s->w, 8);

        unsigned xmax = av_rescale(7, s->w, 8);

        unsigned ymin = av_rescale(5, s->h, 8);

        unsigned ymax = av_rescale(7, s->h, 8);

        unsigned x, y, i, r;

        uint8_t alpha[256];



        r = s->pts;

        for (y = ymin; y < ymax - 15; y += 16) {

            for (x = xmin; x < xmax - 15; x += 16) {

                if ((x ^ y) & 16)

                    continue;

                for (i = 0; i < 256; i++) {

                    r = r * 1664525 + 1013904223;

                    alpha[i] = r >> 24;

                }

                set_color(s, &color, 0xFF00FF80);

                ff_blend_mask(&s->draw, &color, frame->data, frame->linesize,

                                   frame->width, frame->height,

                                   alpha, 16, 16, 16, 3, 0, x, y);

            }

        }

    }



    /* bouncing square */

    if (s->w >= 16 && s->h >= 16) {

        unsigned w = s->w - 8;

        unsigned h = s->h - 8;

        unsigned x = av_rescale_q(s->pts, s->time_base, av_make_q(233, 55 * w)) % (w << 1);

        unsigned y = av_rescale_q(s->pts, s->time_base, av_make_q(233, 89 * h)) % (h << 1);

        if (x > w)

            x = (w << 1) - x;

        if (y > h)

            y = (h << 1) - y;

        x = ff_draw_round_to_sub(&s->draw, 0, -1, x);

        y = ff_draw_round_to_sub(&s->draw, 1, -1, y);

        set_color(s, &color, 0xFF8000FF);

        ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                          x, y, 8, 8);

    }



    /* top right: draw frame time and frame number */

    {

        char buf[256];

        unsigned time;



        time = av_rescale_q(s->pts, s->time_base, av_make_q(1, 1000)) % 86400000;

        set_color(s, &color, 0xC0000000);

        ff_blend_rectangle(&s->draw, &color, frame->data, frame->linesize,

                           frame->width, frame->height,

                           2, 2, 100, 36);

        set_color(s, &color, 0xFFFF8000);

        snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%03d\n%12"PRIi64,

                 time / 3600000, (time / 60000) % 60, (time / 1000) % 60,

                 time % 1000, s->pts);

        draw_text(s, frame, &color, 4, 4, buf);

    }

}

static void test2_fill_picture(AVFilterContext *ctx, AVFrame *frame)

{

    TestSourceContext *s = ctx->priv;

    FFDrawColor color;

    unsigned alpha = (uint32_t)s->alpha << 24;



    

    {

        unsigned i, x = 0, x2;



        x = 0;

        for (i = 1; i < 7; i++) {

            x2 = av_rescale(i, s->w, 6);

            x2 = ff_draw_round_to_sub(&s->draw, 0, 0, x2);

            set_color(s, &color, ((i & 1) ? 0xFF0000 : 0) |

                                 ((i & 2) ? 0x00FF00 : 0) |

                                 ((i & 4) ? 0x0000FF : 0) |

                                 alpha);

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              x, 0, x2 - x, frame->height);

            x = x2;

        }

    }



    

    

    if (s->h >= 64) {

        unsigned x, dx, y0, y, g0, g;



        dx = ff_draw_round_to_sub(&s->draw, 0, +1, 1);

        y0 = av_rescale_q(s->pts, s->time_base, av_make_q(2, s->h - 16));

        g0 = av_rescale_q(s->pts, s->time_base, av_make_q(1, 128));

        for (x = 0; x < s->w; x += dx) {

            g = (av_rescale(x, 6 * 256, s->w) + g0) % (6 * 256);

            set_color(s, &color, color_gradient(g) | alpha);

            y = y0 + av_rescale(x, s->h / 2, s->w);

            y %= 2 * (s->h - 16);

            if (y > s->h - 16)

                y = 2 * (s->h - 16) - y;

            y = ff_draw_round_to_sub(&s->draw, 1, 0, y);

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              x, y, dx, 16);

        }

    }



    

    if (s->w >= 64 && s->h >= 64) {

        int l = (FFMIN(s->w, s->h) - 32) >> 1;

        int steps = FFMAX(4, l >> 5);

        int xc = (s->w >> 2) + (s->w >> 1);

        int yc = (s->h >> 2);

        int cycle = l << 2;

        int pos, xh, yh;

        int c, i;



        for (c = 0; c < 3; c++) {

            set_color(s, &color, (0xBBBBBB ^ (0xFF << (c << 3))) | alpha);

            pos = av_rescale_q(s->pts, s->time_base, av_make_q(64 >> (c << 1), cycle)) % cycle;

            xh = pos < 1 * l ? pos :

                 pos < 2 * l ? l :

                 pos < 3 * l ? 3 * l - pos : 0;

            yh = pos < 1 * l ? 0 :

                 pos < 2 * l ? pos - l :

                 pos < 3 * l ? l :

                               cycle - pos;

            xh -= l >> 1;

            yh -= l >> 1;

            for (i = 1; i <= steps; i++) {

                int x = av_rescale(xh, i, steps) + xc;

                int y = av_rescale(yh, i, steps) + yc;

                x = ff_draw_round_to_sub(&s->draw, 0, -1, x);

                y = ff_draw_round_to_sub(&s->draw, 1, -1, y);

                ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                                  x, y, 8, 8);

            }

        }

    }



    

    if (s->w >= 64 && s->h >= 64) {

        int l = (FFMIN(s->w, s->h) - 16) >> 2;

        int cycle = l << 3;

        int xc = (s->w >> 2);

        int yc = (s->h >> 2) + (s->h >> 1);

        int xm1 = ff_draw_round_to_sub(&s->draw, 0, -1, xc - 8);

        int xm2 = ff_draw_round_to_sub(&s->draw, 0, +1, xc + 8);

        int ym1 = ff_draw_round_to_sub(&s->draw, 1, -1, yc - 8);

        int ym2 = ff_draw_round_to_sub(&s->draw, 1, +1, yc + 8);

        int size, step, x1, x2, y1, y2;



        size = av_rescale_q(s->pts, s->time_base, av_make_q(4, cycle));

        step = size / l;

        size %= l;

        if (step & 1)

            size = l - size;

        step = (step >> 1) & 3;

        set_color(s, &color, 0xFF808080);

        x1 = ff_draw_round_to_sub(&s->draw, 0, -1, xc - 4 - size);

        x2 = ff_draw_round_to_sub(&s->draw, 0, +1, xc + 4 + size);

        y1 = ff_draw_round_to_sub(&s->draw, 1, -1, yc - 4 - size);

        y2 = ff_draw_round_to_sub(&s->draw, 1, +1, yc + 4 + size);

        if (step == 0 || step == 2)

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              x1, ym1, x2 - x1, ym2 - ym1);

        if (step == 1 || step == 2)

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              xm1, y1, xm2 - xm1, y2 - y1);

        if (step == 3)

            ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                              x1, y1, x2 - x1, y2 - y1);

    }



    

    {

        unsigned xmin = av_rescale(5, s->w, 8);

        unsigned xmax = av_rescale(7, s->w, 8);

        unsigned ymin = av_rescale(5, s->h, 8);

        unsigned ymax = av_rescale(7, s->h, 8);

        unsigned x, y, i, r;

        uint8_t alpha[256];



        r = s->pts;

        for (y = ymin; y < ymax - 15; y += 16) {

            for (x = xmin; x < xmax - 15; x += 16) {

                if ((x ^ y) & 16)

                    continue;

                for (i = 0; i < 256; i++) {

                    r = r * 1664525 + 1013904223;

                    alpha[i] = r >> 24;

                }

                set_color(s, &color, 0xFF00FF80);

                ff_blend_mask(&s->draw, &color, frame->data, frame->linesize,

                                   frame->width, frame->height,

                                   alpha, 16, 16, 16, 3, 0, x, y);

            }

        }

    }



    

    if (s->w >= 16 && s->h >= 16) {

        unsigned w = s->w - 8;

        unsigned h = s->h - 8;

        unsigned x = av_rescale_q(s->pts, s->time_base, av_make_q(233, 55 * w)) % (w << 1);

        unsigned y = av_rescale_q(s->pts, s->time_base, av_make_q(233, 89 * h)) % (h << 1);

        if (x > w)

            x = (w << 1) - x;

        if (y > h)

            y = (h << 1) - y;

        x = ff_draw_round_to_sub(&s->draw, 0, -1, x);

        y = ff_draw_round_to_sub(&s->draw, 1, -1, y);

        set_color(s, &color, 0xFF8000FF);

        ff_fill_rectangle(&s->draw, &color, frame->data, frame->linesize,

                          x, y, 8, 8);

    }



    

    {

        char buf[256];

        unsigned time;



        time = av_rescale_q(s->pts, s->time_base, av_make_q(1, 1000)) % 86400000;

        set_color(s, &color, 0xC0000000);

        ff_blend_rectangle(&s->draw, &color, frame->data, frame->linesize,

                           frame->width, frame->height,

                           2, 2, 100, 36);

        set_color(s, &color, 0xFFFF8000);

        snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%03d\n%12"PRIi64,

                 time / 3600000, (time / 60000) % 60, (time / 1000) % 60,

                 time % 1000, s->pts);

        draw_text(s, frame, &color, 4, 4, buf);

    }

}

        for (y = ymin; y < ymax - 15; y += 16) {             for (x = xmin; x < xmax - 15; x += 16) {
static void FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1)

{

    TestSourceContext *s = VAR_0->priv;

    FFDrawColor color;

    unsigned VAR_2 = (uint32_t)s->VAR_2 << 24;



    

    {

        unsigned VAR_33, VAR_36 = 0, VAR_27;



        VAR_36 = 0;

        for (VAR_33 = 1; VAR_33 < 7; VAR_33++) {

            VAR_27 = av_rescale(VAR_33, s->VAR_34, 6);

            VAR_27 = ff_draw_round_to_sub(&s->draw, 0, 0, VAR_27);

            set_color(s, &color, ((VAR_33 & 1) ? 0xFF0000 : 0) |

                                 ((VAR_33 & 2) ? 0x00FF00 : 0) |

                                 ((VAR_33 & 4) ? 0x0000FF : 0) |

                                 VAR_2);

            ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                              VAR_36, 0, VAR_27 - VAR_36, VAR_1->height);

            VAR_36 = VAR_27;

        }

    }



    

    

    if (s->VAR_35 >= 64) {

        unsigned VAR_36, VAR_6, VAR_7, VAR_36, VAR_9, VAR_10;



        VAR_6 = ff_draw_round_to_sub(&s->draw, 0, +1, 1);

        VAR_7 = av_rescale_q(s->pts, s->time_base, av_make_q(2, s->VAR_35 - 16));

        VAR_9 = av_rescale_q(s->pts, s->time_base, av_make_q(1, 128));

        for (VAR_36 = 0; VAR_36 < s->VAR_34; VAR_36 += VAR_6) {

            VAR_10 = (av_rescale(VAR_36, 6 * 256, s->VAR_34) + VAR_9) % (6 * 256);

            set_color(s, &color, color_gradient(VAR_10) | VAR_2);

            VAR_36 = VAR_7 + av_rescale(VAR_36, s->VAR_35 / 2, s->VAR_34);

            VAR_36 %= 2 * (s->VAR_35 - 16);

            if (VAR_36 > s->VAR_35 - 16)

                VAR_36 = 2 * (s->VAR_35 - 16) - VAR_36;

            VAR_36 = ff_draw_round_to_sub(&s->draw, 1, 0, VAR_36);

            ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                              VAR_36, VAR_36, VAR_6, 16);

        }

    }



    

    if (s->VAR_34 >= 64 && s->VAR_35 >= 64) {

        int VAR_20 = (FFMIN(s->VAR_34, s->VAR_35) - 32) >> 1;

        int VAR_12 = FFMAX(4, VAR_20 >> 5);

        int VAR_20 = (s->VAR_34 >> 2) + (s->VAR_34 >> 1);

        int VAR_20 = (s->VAR_35 >> 2);

        int VAR_20 = VAR_20 << 2;

        int VAR_16, VAR_17, VAR_18;

        int VAR_19, VAR_33;



        for (VAR_19 = 0; VAR_19 < 3; VAR_19++) {

            set_color(s, &color, (0xBBBBBB ^ (0xFF << (VAR_19 << 3))) | VAR_2);

            VAR_16 = av_rescale_q(s->pts, s->time_base, av_make_q(64 >> (VAR_19 << 1), VAR_20)) % VAR_20;

            VAR_17 = VAR_16 < 1 * VAR_20 ? VAR_16 :

                 VAR_16 < 2 * VAR_20 ? VAR_20 :

                 VAR_16 < 3 * VAR_20 ? 3 * VAR_20 - VAR_16 : 0;

            VAR_18 = VAR_16 < 1 * VAR_20 ? 0 :

                 VAR_16 < 2 * VAR_20 ? VAR_16 - VAR_20 :

                 VAR_16 < 3 * VAR_20 ? VAR_20 :

                               VAR_20 - VAR_16;

            VAR_17 -= VAR_20 >> 1;

            VAR_18 -= VAR_20 >> 1;

            for (VAR_33 = 1; VAR_33 <= VAR_12; VAR_33++) {

                int VAR_36 = av_rescale(VAR_17, VAR_33, VAR_12) + VAR_20;

                int VAR_36 = av_rescale(VAR_18, VAR_33, VAR_12) + VAR_20;

                VAR_36 = ff_draw_round_to_sub(&s->draw, 0, -1, VAR_36);

                VAR_36 = ff_draw_round_to_sub(&s->draw, 1, -1, VAR_36);

                ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                                  VAR_36, VAR_36, 8, 8);

            }

        }

    }



    

    if (s->VAR_34 >= 64 && s->VAR_35 >= 64) {

        int VAR_20 = (FFMIN(s->VAR_34, s->VAR_35) - 16) >> 2;

        int VAR_20 = VAR_20 << 3;

        int VAR_20 = (s->VAR_34 >> 2);

        int VAR_20 = (s->VAR_35 >> 2) + (s->VAR_35 >> 1);

        int VAR_20 = ff_draw_round_to_sub(&s->draw, 0, -1, VAR_20 - 8);

        int VAR_21 = ff_draw_round_to_sub(&s->draw, 0, +1, VAR_20 + 8);

        int VAR_22 = ff_draw_round_to_sub(&s->draw, 1, -1, VAR_20 - 8);

        int VAR_23 = ff_draw_round_to_sub(&s->draw, 1, +1, VAR_20 + 8);

        int VAR_24, VAR_25, VAR_26, VAR_27, VAR_27, VAR_28;



        VAR_24 = av_rescale_q(s->pts, s->time_base, av_make_q(4, VAR_20));

        VAR_25 = VAR_24 / VAR_20;

        VAR_24 %= VAR_20;

        if (VAR_25 & 1)

            VAR_24 = VAR_20 - VAR_24;

        VAR_25 = (VAR_25 >> 1) & 3;

        set_color(s, &color, 0xFF808080);

        VAR_26 = ff_draw_round_to_sub(&s->draw, 0, -1, VAR_20 - 4 - VAR_24);

        VAR_27 = ff_draw_round_to_sub(&s->draw, 0, +1, VAR_20 + 4 + VAR_24);

        VAR_27 = ff_draw_round_to_sub(&s->draw, 1, -1, VAR_20 - 4 - VAR_24);

        VAR_28 = ff_draw_round_to_sub(&s->draw, 1, +1, VAR_20 + 4 + VAR_24);

        if (VAR_25 == 0 || VAR_25 == 2)

            ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                              VAR_26, VAR_22, VAR_27 - VAR_26, VAR_23 - VAR_22);

        if (VAR_25 == 1 || VAR_25 == 2)

            ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                              VAR_20, VAR_27, VAR_21 - VAR_20, VAR_28 - VAR_27);

        if (VAR_25 == 3)

            ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                              VAR_26, VAR_27, VAR_27 - VAR_26, VAR_28 - VAR_27);

    }



    

    {

        unsigned VAR_29 = av_rescale(5, s->VAR_34, 8);

        unsigned VAR_30 = av_rescale(7, s->VAR_34, 8);

        unsigned VAR_31 = av_rescale(5, s->VAR_35, 8);

        unsigned VAR_32 = av_rescale(7, s->VAR_35, 8);

        unsigned VAR_36, VAR_36, VAR_33, VAR_33;

        uint8_t VAR_2[256];



        VAR_33 = s->pts;

        for (VAR_36 = VAR_31; VAR_36 < VAR_32 - 15; VAR_36 += 16) {

            for (VAR_36 = VAR_29; VAR_36 < VAR_30 - 15; VAR_36 += 16) {

                if ((VAR_36 ^ VAR_36) & 16)

                    continue;

                for (VAR_33 = 0; VAR_33 < 256; VAR_33++) {

                    VAR_33 = VAR_33 * 1664525 + 1013904223;

                    VAR_2[VAR_33] = VAR_33 >> 24;

                }

                set_color(s, &color, 0xFF00FF80);

                ff_blend_mask(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                                   VAR_1->width, VAR_1->height,

                                   VAR_2, 16, 16, 16, 3, 0, VAR_36, VAR_36);

            }

        }

    }



    

    if (s->VAR_34 >= 16 && s->VAR_35 >= 16) {

        unsigned VAR_34 = s->VAR_34 - 8;

        unsigned VAR_35 = s->VAR_35 - 8;

        unsigned VAR_36 = av_rescale_q(s->pts, s->time_base, av_make_q(233, 55 * VAR_34)) % (VAR_34 << 1);

        unsigned VAR_36 = av_rescale_q(s->pts, s->time_base, av_make_q(233, 89 * VAR_35)) % (VAR_35 << 1);

        if (VAR_36 > VAR_34)

            VAR_36 = (VAR_34 << 1) - VAR_36;

        if (VAR_36 > VAR_35)

            VAR_36 = (VAR_35 << 1) - VAR_36;

        VAR_36 = ff_draw_round_to_sub(&s->draw, 0, -1, VAR_36);

        VAR_36 = ff_draw_round_to_sub(&s->draw, 1, -1, VAR_36);

        set_color(s, &color, 0xFF8000FF);

        ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                          VAR_36, VAR_36, 8, 8);

    }



    

    {

        char VAR_36[256];

        unsigned VAR_37;



        VAR_37 = av_rescale_q(s->pts, s->time_base, av_make_q(1, 1000)) % 86400000;

        set_color(s, &color, 0xC0000000);

        ff_blend_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,

                           VAR_1->width, VAR_1->height,

                           2, 2, 100, 36);

        set_color(s, &color, 0xFFFF8000);

        snprintf(VAR_36, sizeof(VAR_36), "%02d:%02d:%02d.%03d\n%12"PRIi64,

                 VAR_37 / 3600000, (VAR_37 / 60000) % 60, (VAR_37 / 1000) % 60,

                 VAR_37 % 1000, s->pts);

        draw_text(s, VAR_1, &color, 4, 4, VAR_36);

    }

}

static void FUNC_0(AVFilterContext *VAR_0, AVFrame *VAR_1)
{ TestSourceContext *s = VAR_0->priv; FFDrawColor color; unsigned VAR_2 = (uint32_t)s->VAR_2 << 24; { unsigned VAR_33, VAR_36 = 0, VAR_27; VAR_36 = 0; for (VAR_33 = 1; VAR_33 < 7; VAR_33++) { VAR_27 = av_rescale(VAR_33, s->VAR_34, 6); VAR_27 = ff_draw_round_to_sub(&s->draw, 0, 0, VAR_27); set_color(s, &color, ((VAR_33 & 1) ? 0xFF0000 : 0) |
((VAR_33 & 2) ? 0x00FF00 : 0) |
((VAR_33 & 4) ? 0x0000FF : 0) |
VAR_2); ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_36, 0, VAR_27 - VAR_36, VAR_1->height); VAR_36 = VAR_27; } } if (s->VAR_35 >= 64) { unsigned VAR_36, VAR_6, VAR_7, VAR_36, VAR_9, VAR_10; VAR_6 = ff_draw_round_to_sub(&s->draw, 0, +1, 1); VAR_7 = av_rescale_q(s->pts, s->time_base, av_make_q(2, s->VAR_35 - 16)); VAR_9 = av_rescale_q(s->pts, s->time_base, av_make_q(1, 128)); for (VAR_36 = 0; VAR_36 < s->VAR_34; VAR_36 += VAR_6) { VAR_10 = (av_rescale(VAR_36, 6 * 256, s->VAR_34) + VAR_9) % (6 * 256); set_color(s, &color, color_gradient(VAR_10) | VAR_2); VAR_36 = VAR_7 + av_rescale(VAR_36, s->VAR_35 / 2, s->VAR_34); VAR_36 %= 2 * (s->VAR_35 - 16); if (VAR_36 > s->VAR_35 - 16)
VAR_36 = 2 * (s->VAR_35 - 16) - VAR_36; VAR_36 = ff_draw_round_to_sub(&s->draw, 1, 0, VAR_36); ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_36, VAR_36, VAR_6, 16); } } if (s->VAR_34 >= 64 && s->VAR_35 >= 64) { int VAR_20 = (FFMIN(s->VAR_34, s->VAR_35) - 32) >> 1; int VAR_12 = FFMAX(4, VAR_20 >> 5); int VAR_20 = (s->VAR_34 >> 2) + (s->VAR_34 >> 1); int VAR_20 = (s->VAR_35 >> 2); int VAR_20 = VAR_20 << 2; int VAR_16, VAR_17, VAR_18; int VAR_19, VAR_33; for (VAR_19 = 0; VAR_19 < 3; VAR_19++) { set_color(s, &color, (0xBBBBBB ^ (0xFF << (VAR_19 << 3))) | VAR_2); VAR_16 = av_rescale_q(s->pts, s->time_base, av_make_q(64 >> (VAR_19 << 1), VAR_20)) % VAR_20; VAR_17 = VAR_16 < 1 * VAR_20 ? VAR_16 :
VAR_16 < 2 * VAR_20 ? VAR_20 :
VAR_16 < 3 * VAR_20 ? 3 * VAR_20 - VAR_16 : 0; VAR_18 = VAR_16 < 1 * VAR_20 ? 0 :
VAR_16 < 2 * VAR_20 ? VAR_16 - VAR_20 :
VAR_16 < 3 * VAR_20 ? VAR_20 :
VAR_20 - VAR_16; VAR_17 -= VAR_20 >> 1; VAR_18 -= VAR_20 >> 1; for (VAR_33 = 1; VAR_33 <= VAR_12; VAR_33++) { int VAR_36 = av_rescale(VAR_17, VAR_33, VAR_12) + VAR_20; int VAR_36 = av_rescale(VAR_18, VAR_33, VAR_12) + VAR_20; VAR_36 = ff_draw_round_to_sub(&s->draw, 0, -1, VAR_36); VAR_36 = ff_draw_round_to_sub(&s->draw, 1, -1, VAR_36); ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_36, VAR_36, 8, 8); } } } if (s->VAR_34 >= 64 && s->VAR_35 >= 64) { int VAR_20 = (FFMIN(s->VAR_34, s->VAR_35) - 16) >> 2; int VAR_20 = VAR_20 << 3; int VAR_20 = (s->VAR_34 >> 2); int VAR_20 = (s->VAR_35 >> 2) + (s->VAR_35 >> 1); int VAR_20 = ff_draw_round_to_sub(&s->draw, 0, -1, VAR_20 - 8); int VAR_21 = ff_draw_round_to_sub(&s->draw, 0, +1, VAR_20 + 8); int VAR_22 = ff_draw_round_to_sub(&s->draw, 1, -1, VAR_20 - 8); int VAR_23 = ff_draw_round_to_sub(&s->draw, 1, +1, VAR_20 + 8); int VAR_24, VAR_25, VAR_26, VAR_27, VAR_27, VAR_28; VAR_24 = av_rescale_q(s->pts, s->time_base, av_make_q(4, VAR_20)); VAR_25 = VAR_24 / VAR_20; VAR_24 %= VAR_20; if (VAR_25 & 1)
VAR_24 = VAR_20 - VAR_24; VAR_25 = (VAR_25 >> 1) & 3; set_color(s, &color, 0xFF808080); VAR_26 = ff_draw_round_to_sub(&s->draw, 0, -1, VAR_20 - 4 - VAR_24); VAR_27 = ff_draw_round_to_sub(&s->draw, 0, +1, VAR_20 + 4 + VAR_24); VAR_27 = ff_draw_round_to_sub(&s->draw, 1, -1, VAR_20 - 4 - VAR_24); VAR_28 = ff_draw_round_to_sub(&s->draw, 1, +1, VAR_20 + 4 + VAR_24); if (VAR_25 == 0 || VAR_25 == 2)
ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_26, VAR_22, VAR_27 - VAR_26, VAR_23 - VAR_22); if (VAR_25 == 1 || VAR_25 == 2)
ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_20, VAR_27, VAR_21 - VAR_20, VAR_28 - VAR_27); if (VAR_25 == 3)
ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_26, VAR_27, VAR_27 - VAR_26, VAR_28 - VAR_27); } { unsigned VAR_29 = av_rescale(5, s->VAR_34, 8); unsigned VAR_30 = av_rescale(7, s->VAR_34, 8); unsigned VAR_31 = av_rescale(5, s->VAR_35, 8); unsigned VAR_32 = av_rescale(7, s->VAR_35, 8); unsigned VAR_36, VAR_36, VAR_33, VAR_33; uint8_t VAR_2[256]; VAR_33 = s->pts; for (VAR_36 = VAR_31; VAR_36 < VAR_32 - 15; VAR_36 += 16) { for (VAR_36 = VAR_29; VAR_36 < VAR_30 - 15; VAR_36 += 16) { if ((VAR_36 ^ VAR_36) & 16)
continue; for (VAR_33 = 0; VAR_33 < 256; VAR_33++) { VAR_33 = VAR_33 * 1664525 + 1013904223; VAR_2[VAR_33] = VAR_33 >> 24; } set_color(s, &color, 0xFF00FF80); ff_blend_mask(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_1->width, VAR_1->height,
VAR_2, 16, 16, 16, 3, 0, VAR_36, VAR_36); } } } if (s->VAR_34 >= 16 && s->VAR_35 >= 16) { unsigned VAR_34 = s->VAR_34 - 8; unsigned VAR_35 = s->VAR_35 - 8; unsigned VAR_36 = av_rescale_q(s->pts, s->time_base, av_make_q(233, 55 * VAR_34)) % (VAR_34 << 1); unsigned VAR_36 = av_rescale_q(s->pts, s->time_base, av_make_q(233, 89 * VAR_35)) % (VAR_35 << 1); if (VAR_36 > VAR_34)
VAR_36 = (VAR_34 << 1) - VAR_36; if (VAR_36 > VAR_35)
VAR_36 = (VAR_35 << 1) - VAR_36; VAR_36 = ff_draw_round_to_sub(&s->draw, 0, -1, VAR_36); VAR_36 = ff_draw_round_to_sub(&s->draw, 1, -1, VAR_36); set_color(s, &color, 0xFF8000FF); ff_fill_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_36, VAR_36, 8, 8); } { char VAR_36[256]; unsigned VAR_37; VAR_37 = av_rescale_q(s->pts, s->time_base, av_make_q(1, 1000)) % 86400000; set_color(s, &color, 0xC0000000); ff_blend_rectangle(&s->draw, &color, VAR_1->data, VAR_1->linesize,
VAR_1->width, VAR_1->height,
2, 2, 100, 36); set_color(s, &color, 0xFFFF8000); snprintf(VAR_36, sizeof(VAR_36), "%02d:%02d:%02d.%03d\n%12"PRIi64,
VAR_37 / 3600000, (VAR_37 / 60000) % 60, (VAR_37 / 1000) % 60,
VAR_37 % 1000, s->pts); draw_text(s, VAR_1, &color, 4, 4, VAR_36); } }