static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata,

                              int jobnr, int threadnr)

{

    VP8Context *s = avctx->priv_data;

    VP8ThreadData *td = &s->thread_data[threadnr];

    int mb_x, mb_y = td->thread_mb_pos >> 16, num_jobs = s->num_jobs;

    AVFrame *curframe = s->curframe->tf.f;

    VP8Macroblock *mb;

    VP8ThreadData *prev_td, *next_td;

    uint8_t *dst[3] = {

        curframe->data[0] + 16 * mb_y * s->linesize,

        curframe->data[1] +  8 * mb_y * s->uvlinesize,

        curframe->data[2] +  8 * mb_y * s->uvlinesize

    };



    if (s->mb_layout == 1)

        mb = s->macroblocks_base + ((s->mb_width + 1) * (mb_y + 1) + 1);

    else

        mb = s->macroblocks + (s->mb_height - mb_y - 1) * 2;



    if (mb_y == 0)

        prev_td = td;

    else

        prev_td = &s->thread_data[(jobnr + num_jobs - 1) % num_jobs];

    if (mb_y == s->mb_height - 1)

        next_td = td;

    else

        next_td = &s->thread_data[(jobnr + 1) % num_jobs];



    for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb++) {

        VP8FilterStrength *f = &td->filter_strength[mb_x];

        if (prev_td != td)

            check_thread_pos(td, prev_td,

                             (mb_x + 1) + (s->mb_width + 3), mb_y - 1);

        if (next_td != td)

            if (next_td != &s->thread_data[0])

                check_thread_pos(td, next_td, mb_x + 1, mb_y + 1);



        if (num_jobs == 1) {

            if (s->filter.simple)

                backup_mb_border(s->top_border[mb_x + 1], dst[0],

                                 NULL, NULL, s->linesize, 0, 1);

            else

                backup_mb_border(s->top_border[mb_x + 1], dst[0],

                                 dst[1], dst[2], s->linesize, s->uvlinesize, 0);

        }



        if (s->filter.simple)

            filter_mb_simple(s, dst[0], f, mb_x, mb_y);

        else

            filter_mb(s, dst, f, mb_x, mb_y);

        dst[0] += 16;

        dst[1] += 8;

        dst[2] += 8;



        update_pos(td, mb_y, (s->mb_width + 3) + mb_x);

    }

}

static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata,

                              int jobnr, int threadnr)

{

    VP8Context *s = avctx->priv_data;

    VP8ThreadData *td = &s->thread_data[threadnr];

    int mb_x, mb_y = td->thread_mb_pos >> 16, num_jobs = s->num_jobs;

    AVFrame *curframe = s->curframe->tf.f;

    VP8Macroblock *mb;

    VP8ThreadData *prev_td, *next_td;

    uint8_t *dst[3] = {

        curframe->data[0] + 16 * mb_y * s->linesize,

        curframe->data[1] +  8 * mb_y * s->uvlinesize,

        curframe->data[2] +  8 * mb_y * s->uvlinesize

    };



    if (s->mb_layout == 1)

        mb = s->macroblocks_base + ((s->mb_width + 1) * (mb_y + 1) + 1);

    else

        mb = s->macroblocks + (s->mb_height - mb_y - 1) * 2;



    if (mb_y == 0)

        prev_td = td;

    else

        prev_td = &s->thread_data[(jobnr + num_jobs - 1) % num_jobs];

    if (mb_y == s->mb_height - 1)

        next_td = td;

    else

        next_td = &s->thread_data[(jobnr + 1) % num_jobs];



    for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb++) {

        VP8FilterStrength *f = &td->filter_strength[mb_x];

        if (prev_td != td)

            check_thread_pos(td, prev_td,

                             (mb_x + 1) + (s->mb_width + 3), mb_y - 1);

        if (next_td != td)

            if (next_td != &s->thread_data[0])

                check_thread_pos(td, next_td, mb_x + 1, mb_y + 1);



        if (num_jobs == 1) {

            if (s->filter.simple)

                backup_mb_border(s->top_border[mb_x + 1], dst[0],

                                 NULL, NULL, s->linesize, 0, 1);

            else

                backup_mb_border(s->top_border[mb_x + 1], dst[0],

                                 dst[1], dst[2], s->linesize, s->uvlinesize, 0);

        }



        if (s->filter.simple)

            filter_mb_simple(s, dst[0], f, mb_x, mb_y);

        else

            filter_mb(s, dst, f, mb_x, mb_y);

        dst[0] += 16;

        dst[1] += 8;

        dst[2] += 8;



        update_pos(td, mb_y, (s->mb_width + 3) + mb_x);

    }

}

                              int jobnr, int threadnr)             filter_mb(s, dst, f, mb_x, mb_y);
static void FUNC_0(AVCodecContext *VAR_0, void *VAR_1,

                              int VAR_2, int VAR_3)

{

    VP8Context *s = VAR_0->priv_data;

    VP8ThreadData *td = &s->thread_data[VAR_3];

    int VAR_4, VAR_5 = td->thread_mb_pos >> 16, VAR_6 = s->VAR_6;

    AVFrame *curframe = s->curframe->tf.f;

    VP8Macroblock *mb;

    VP8ThreadData *prev_td, *next_td;

    uint8_t *dst[3] = {

        curframe->data[0] + 16 * VAR_5 * s->linesize,

        curframe->data[1] +  8 * VAR_5 * s->uvlinesize,

        curframe->data[2] +  8 * VAR_5 * s->uvlinesize

    };



    if (s->mb_layout == 1)

        mb = s->macroblocks_base + ((s->mb_width + 1) * (VAR_5 + 1) + 1);

    else

        mb = s->macroblocks + (s->mb_height - VAR_5 - 1) * 2;



    if (VAR_5 == 0)

        prev_td = td;

    else

        prev_td = &s->thread_data[(VAR_2 + VAR_6 - 1) % VAR_6];

    if (VAR_5 == s->mb_height - 1)

        next_td = td;

    else

        next_td = &s->thread_data[(VAR_2 + 1) % VAR_6];



    for (VAR_4 = 0; VAR_4 < s->mb_width; VAR_4++, mb++) {

        VP8FilterStrength *f = &td->filter_strength[VAR_4];

        if (prev_td != td)

            check_thread_pos(td, prev_td,

                             (VAR_4 + 1) + (s->mb_width + 3), VAR_5 - 1);

        if (next_td != td)

            if (next_td != &s->thread_data[0])

                check_thread_pos(td, next_td, VAR_4 + 1, VAR_5 + 1);



        if (VAR_6 == 1) {

            if (s->filter.simple)

                backup_mb_border(s->top_border[VAR_4 + 1], dst[0],

                                 NULL, NULL, s->linesize, 0, 1);

            else

                backup_mb_border(s->top_border[VAR_4 + 1], dst[0],

                                 dst[1], dst[2], s->linesize, s->uvlinesize, 0);

        }



        if (s->filter.simple)

            filter_mb_simple(s, dst[0], f, VAR_4, VAR_5);

        else

            filter_mb(s, dst, f, VAR_4, VAR_5);

        dst[0] += 16;

        dst[1] += 8;

        dst[2] += 8;



        update_pos(td, VAR_5, (s->mb_width + 3) + VAR_4);

    }

}

static void FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int VAR_2, int VAR_3)
{ VP8Context *s = VAR_0->priv_data; VP8ThreadData *td = &s->thread_data[VAR_3]; int VAR_4, VAR_5 = td->thread_mb_pos >> 16, VAR_6 = s->VAR_6; AVFrame *curframe = s->curframe->tf.f; VP8Macroblock *mb; VP8ThreadData *prev_td, *next_td; uint8_t *dst[3] = { curframe->data[0] + 16 * VAR_5 * s->linesize,
curframe->data[1] +  8 * VAR_5 * s->uvlinesize,
curframe->data[2] +  8 * VAR_5 * s->uvlinesize
}; if (s->mb_layout == 1)
mb = s->macroblocks_base + ((s->mb_width + 1) * (VAR_5 + 1) + 1); else
mb = s->macroblocks + (s->mb_height - VAR_5 - 1) * 2; if (VAR_5 == 0)
prev_td = td; else
prev_td = &s->thread_data[(VAR_2 + VAR_6 - 1) % VAR_6]; if (VAR_5 == s->mb_height - 1)
next_td = td; else
next_td = &s->thread_data[(VAR_2 + 1) % VAR_6]; for (VAR_4 = 0; VAR_4 < s->mb_width; VAR_4++, mb++) { VP8FilterStrength *f = &td->filter_strength[VAR_4]; if (prev_td != td)
check_thread_pos(td, prev_td,
(VAR_4 + 1) + (s->mb_width + 3), VAR_5 - 1); if (next_td != td)
if (next_td != &s->thread_data[0])
check_thread_pos(td, next_td, VAR_4 + 1, VAR_5 + 1); if (VAR_6 == 1) { if (s->filter.simple)
backup_mb_border(s->top_border[VAR_4 + 1], dst[0],
NULL, NULL, s->linesize, 0, 1); else
backup_mb_border(s->top_border[VAR_4 + 1], dst[0],
dst[1], dst[2], s->linesize, s->uvlinesize, 0); } if (s->filter.simple)
filter_mb_simple(s, dst[0], f, VAR_4, VAR_5); else
filter_mb(s, dst, f, VAR_4, VAR_5); dst[0] += 16; dst[1] += 8; dst[2] += 8; update_pos(td, VAR_5, (s->mb_width + 3) + VAR_4); } }