static av_always_inline 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[s->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];

    }



/* Like av_clip for inputs 0 and max, where max is equal to (2^n-1) */

#define POW2CLIP(x,max) (((x) & ~max) ? (-(x))>>31 & max : (x));

    filter_level = POW2CLIP(filter_level, 63);



    interior_limit = filter_level;

    if (s->filter.sharpness) {

        interior_limit >>= s->filter.sharpness > 4 ? 2 : 1;

        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;

}

static av_always_inline 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[s->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];

    }





#define POW2CLIP(x,max) (((x) & ~max) ? (-(x))>>31 & max : (x));

    filter_level = POW2CLIP(filter_level, 63);



    interior_limit = filter_level;

    if (s->filter.sharpness) {

        interior_limit >>= s->filter.sharpness > 4 ? 2 : 1;

        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;

}

static av_always_inline void FUNC_0(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f )

{

    int VAR_0, VAR_1;



    if (s->segmentation.enabled) {

        VAR_1 = s->segmentation.VAR_1[s->segment];

        if (!s->segmentation.absolute_vals)

            VAR_1 += s->filter.level;

    } else

        VAR_1 = s->filter.level;



    if (s->lf_delta.enabled) {

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

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

    }





#define POW2CLIP(x,max) (((x) & ~max) ? (-(x))>>31 & max : (x));

    VAR_1 = POW2CLIP(VAR_1, 63);



    VAR_0 = VAR_1;

    if (s->filter.sharpness) {

        VAR_0 >>= s->filter.sharpness > 4 ? 2 : 1;

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

    }

    VAR_0 = FFMAX(VAR_0, 1);



    f->VAR_1 = VAR_1;

    f->inner_limit = VAR_0;

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

}

static av_always_inline void FUNC_0(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f )
{ int VAR_0, VAR_1; if (s->segmentation.enabled) { VAR_1 = s->segmentation.VAR_1[s->segment]; if (!s->segmentation.absolute_vals)
VAR_1 += s->filter.level; } else VAR_1 = s->filter.level; if (s->lf_delta.enabled) { VAR_1 += s->lf_delta.ref[mb->ref_frame]; VAR_1 += s->lf_delta.mode[mb->mode]; } #define POW2CLIP(x,max) (((x) & ~max) ? (-(x))>>31 & max : (x)); VAR_1 = POW2CLIP(VAR_1, 63); VAR_0 = VAR_1; if (s->filter.sharpness) { VAR_0 >>= s->filter.sharpness > 4 ? 2 : 1; VAR_0 = FFMIN(VAR_0, 9 - s->filter.sharpness); } VAR_0 = FFMAX(VAR_0, 1); f->VAR_1 = VAR_1; f->inner_limit = VAR_0; f->inner_filter = !mb->skip || mb->mode == MODE_I4x4 || mb->mode == VP8_MVMODE_SPLIT; }