void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f)

{

    int interior_limit, filter_level;



    if (s->segmentation.enabled) {

        filter_level = s->segmentation.filter_level[mb->segment];

        if (!s->segmentation.absolute_vals)

            filter_level += s->filter.level;

    } else

        filter_level = s->filter.level;



    if (s->lf_delta.enabled) {

        filter_level += s->lf_delta.ref[mb->ref_frame];

        filter_level += s->lf_delta.mode[mb->mode];

    }



    filter_level = av_clip_uintp2(filter_level, 6);



    interior_limit = filter_level;

    if (s->filter.sharpness) {

        interior_limit >>= (s->filter.sharpness + 3) >> 2;

        interior_limit = FFMIN(interior_limit, 9 - s->filter.sharpness);

    }

    interior_limit = FFMAX(interior_limit, 1);



    f->filter_level = filter_level;

    f->inner_limit = interior_limit;

    f->inner_filter = !mb->skip || mb->mode == MODE_I4x4 ||

                      mb->mode == VP8_MVMODE_SPLIT;

}

void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f)

{

    int interior_limit, filter_level;



    if (s->segmentation.enabled) {

        filter_level = s->segmentation.filter_level[mb->segment];

        if (!s->segmentation.absolute_vals)

            filter_level += s->filter.level;

    } else

        filter_level = s->filter.level;



    if (s->lf_delta.enabled) {

        filter_level += s->lf_delta.ref[mb->ref_frame];

        filter_level += s->lf_delta.mode[mb->mode];

    }



    filter_level = av_clip_uintp2(filter_level, 6);



    interior_limit = filter_level;

    if (s->filter.sharpness) {

        interior_limit >>= (s->filter.sharpness + 3) >> 2;

        interior_limit = FFMIN(interior_limit, 9 - s->filter.sharpness);

    }

    interior_limit = FFMAX(interior_limit, 1);



    f->filter_level = filter_level;

    f->inner_limit = interior_limit;

    f->inner_filter = !mb->skip || mb->mode == MODE_I4x4 ||

                      mb->mode == VP8_MVMODE_SPLIT;

}

void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f)     f->inner_filter = !mb->skip || mb->mode == MODE_I4x4 ||
void FUNC_0(VP8Context *VAR_0, VP8Macroblock *VAR_1, VP8FilterStrength *VAR_2)

{

    int VAR_3, VAR_4;



    if (VAR_0->segmentation.enabled) {

        VAR_4 = VAR_0->segmentation.VAR_4[VAR_1->segment];

        if (!VAR_0->segmentation.absolute_vals)

            VAR_4 += VAR_0->filter.level;

    } else

        VAR_4 = VAR_0->filter.level;



    if (VAR_0->lf_delta.enabled) {

        VAR_4 += VAR_0->lf_delta.ref[VAR_1->ref_frame];

        VAR_4 += VAR_0->lf_delta.mode[VAR_1->mode];

    }



    VAR_4 = av_clip_uintp2(VAR_4, 6);



    VAR_3 = VAR_4;

    if (VAR_0->filter.sharpness) {

        VAR_3 >>= (VAR_0->filter.sharpness + 3) >> 2;

        VAR_3 = FFMIN(VAR_3, 9 - VAR_0->filter.sharpness);

    }

    VAR_3 = FFMAX(VAR_3, 1);



    VAR_2->VAR_4 = VAR_4;

    VAR_2->inner_limit = VAR_3;

    VAR_2->inner_filter = !VAR_1->skip || VAR_1->mode == MODE_I4x4 ||

                      VAR_1->mode == VP8_MVMODE_SPLIT;

}

void FUNC_0(VP8Context *VAR_0, VP8Macroblock *VAR_1, VP8FilterStrength *VAR_2)
{ int VAR_3, VAR_4; if (VAR_0->segmentation.enabled) { VAR_4 = VAR_0->segmentation.VAR_4[VAR_1->segment]; if (!VAR_0->segmentation.absolute_vals)
VAR_4 += VAR_0->filter.level; } else VAR_4 = VAR_0->filter.level; if (VAR_0->lf_delta.enabled) { VAR_4 += VAR_0->lf_delta.ref[VAR_1->ref_frame]; VAR_4 += VAR_0->lf_delta.mode[VAR_1->mode]; } VAR_4 = av_clip_uintp2(VAR_4, 6); VAR_3 = VAR_4; if (VAR_0->filter.sharpness) { VAR_3 >>= (VAR_0->filter.sharpness + 3) >> 2; VAR_3 = FFMIN(VAR_3, 9 - VAR_0->filter.sharpness); } VAR_3 = FFMAX(VAR_3, 1); VAR_2->VAR_4 = VAR_4; VAR_2->inner_limit = VAR_3; VAR_2->inner_filter = !VAR_1->skip || VAR_1->mode == MODE_I4x4 ||
VAR_1->mode == VP8_MVMODE_SPLIT; }