static void vp3_draw_horiz_band(Vp3DecodeContext *s, int y)

{

    int h, cy, i;

    int offset[AV_NUM_DATA_POINTERS];



    if (HAVE_THREADS && s->avctx->active_thread_type & FF_THREAD_FRAME) {

        int y_flipped = s->flipped_image ? s->avctx->height - y : y;



        /* At the end of the frame, report INT_MAX instead of the height of

         * the frame. This makes the other threads' ff_thread_await_progress()

         * calls cheaper, because they don't have to clip their values. */

        ff_thread_report_progress(&s->current_frame,

                                  y_flipped == s->avctx->height ? INT_MAX

                                                                : y_flipped - 1,

                                  0);

    }



    if (s->avctx->draw_horiz_band == NULL)

        return;



    h = y - s->last_slice_end;

    s->last_slice_end = y;

    y -= h;



    if (!s->flipped_image)

        y = s->avctx->height - y - h;



    cy        = y >> s->chroma_y_shift;

    offset[0] = s->current_frame.f->linesize[0] * y;

    offset[1] = s->current_frame.f->linesize[1] * cy;

    offset[2] = s->current_frame.f->linesize[2] * cy;

    for (i = 3; i < AV_NUM_DATA_POINTERS; i++)

        offset[i] = 0;



    emms_c();

    s->avctx->draw_horiz_band(s->avctx, s->current_frame.f, offset, y, 3, h);

}

static void vp3_draw_horiz_band(Vp3DecodeContext *s, int y)

{

    int h, cy, i;

    int offset[AV_NUM_DATA_POINTERS];



    if (HAVE_THREADS && s->avctx->active_thread_type & FF_THREAD_FRAME) {

        int y_flipped = s->flipped_image ? s->avctx->height - y : y;



        





        ff_thread_report_progress(&s->current_frame,

                                  y_flipped == s->avctx->height ? INT_MAX

                                                                : y_flipped - 1,

                                  0);

    }



    if (s->avctx->draw_horiz_band == NULL)

        return;



    h = y - s->last_slice_end;

    s->last_slice_end = y;

    y -= h;



    if (!s->flipped_image)

        y = s->avctx->height - y - h;



    cy        = y >> s->chroma_y_shift;

    offset[0] = s->current_frame.f->linesize[0] * y;

    offset[1] = s->current_frame.f->linesize[1] * cy;

    offset[2] = s->current_frame.f->linesize[2] * cy;

    for (i = 3; i < AV_NUM_DATA_POINTERS; i++)

        offset[i] = 0;



    emms_c();

    s->avctx->draw_horiz_band(s->avctx, s->current_frame.f, offset, y, 3, h);

}

static void FUNC_0(Vp3DecodeContext *VAR_0, int VAR_1)

{

    int VAR_2, VAR_3, VAR_4;

    int VAR_5[AV_NUM_DATA_POINTERS];



    if (HAVE_THREADS && VAR_0->avctx->active_thread_type & FF_THREAD_FRAME) {

        int VAR_6 = VAR_0->flipped_image ? VAR_0->avctx->height - VAR_1 : VAR_1;



        





        ff_thread_report_progress(&VAR_0->current_frame,

                                  VAR_6 == VAR_0->avctx->height ? INT_MAX

                                                                : VAR_6 - 1,

                                  0);

    }



    if (VAR_0->avctx->draw_horiz_band == NULL)

        return;



    VAR_2 = VAR_1 - VAR_0->last_slice_end;

    VAR_0->last_slice_end = VAR_1;

    VAR_1 -= VAR_2;



    if (!VAR_0->flipped_image)

        VAR_1 = VAR_0->avctx->height - VAR_1 - VAR_2;



    VAR_3        = VAR_1 >> VAR_0->chroma_y_shift;

    VAR_5[0] = VAR_0->current_frame.f->linesize[0] * VAR_1;

    VAR_5[1] = VAR_0->current_frame.f->linesize[1] * VAR_3;

    VAR_5[2] = VAR_0->current_frame.f->linesize[2] * VAR_3;

    for (VAR_4 = 3; VAR_4 < AV_NUM_DATA_POINTERS; VAR_4++)

        VAR_5[VAR_4] = 0;



    emms_c();

    VAR_0->avctx->draw_horiz_band(VAR_0->avctx, VAR_0->current_frame.f, VAR_5, VAR_1, 3, VAR_2);

}

static void FUNC_0(Vp3DecodeContext *VAR_0, int VAR_1)
{ int VAR_2, VAR_3, VAR_4; int VAR_5[AV_NUM_DATA_POINTERS]; if (HAVE_THREADS && VAR_0->avctx->active_thread_type & FF_THREAD_FRAME) { int VAR_6 = VAR_0->flipped_image ? VAR_0->avctx->height - VAR_1 : VAR_1; ff_thread_report_progress(&VAR_0->current_frame,
VAR_6 == VAR_0->avctx->height ? INT_MAX
: VAR_6 - 1,
0); } if (VAR_0->avctx->draw_horiz_band == NULL)
return; VAR_2 = VAR_1 - VAR_0->last_slice_end; VAR_0->last_slice_end = VAR_1; VAR_1 -= VAR_2; if (!VAR_0->flipped_image)
VAR_1 = VAR_0->avctx->height - VAR_1 - VAR_2; VAR_3        = VAR_1 >> VAR_0->chroma_y_shift; VAR_5[0] = VAR_0->current_frame.f->linesize[0] * VAR_1; VAR_5[1] = VAR_0->current_frame.f->linesize[1] * VAR_3; VAR_5[2] = VAR_0->current_frame.f->linesize[2] * VAR_3; for (VAR_4 = 3; VAR_4 < AV_NUM_DATA_POINTERS; VAR_4++) VAR_5[VAR_4] = 0; emms_c(); VAR_0->avctx->draw_horiz_band(VAR_0->avctx, VAR_0->current_frame.f, VAR_5, VAR_1, 3, VAR_2); }