static av_always_inline av_flatten void h264_loop_filter_luma_intra_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta)

{

    int d;

    for( d = 0; d < 16; d++ ) {

        const int p2 = pix[-3*xstride];

        const int p1 = pix[-2*xstride];

        const int p0 = pix[-1*xstride];



        const int q0 = pix[ 0*xstride];

        const int q1 = pix[ 1*xstride];

        const int q2 = pix[ 2*xstride];



        if( FFABS( p0 - q0 ) < alpha &&

            FFABS( p1 - p0 ) < beta &&

            FFABS( q1 - q0 ) < beta ) {



            if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){

                if( FFABS( p2 - p0 ) < beta)

                {

                    const int p3 = pix[-4*xstride];

                    /* p0', p1', p2' */

                    pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3;

                    pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2;

                    pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3;

                } else {

                    /* p0' */

                    pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2;

                }

                if( FFABS( q2 - q0 ) < beta)

                {

                    const int q3 = pix[3*xstride];

                    /* q0', q1', q2' */

                    pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3;

                    pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2;

                    pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3;

                } else {

                    /* q0' */

                    pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2;

                }

            }else{

                /* p0', q0' */

                pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2;

                pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2;

            }

        }

        pix += ystride;

    }

}

static av_always_inline av_flatten void h264_loop_filter_luma_intra_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta)

{

    int d;

    for( d = 0; d < 16; d++ ) {

        const int p2 = pix[-3*xstride];

        const int p1 = pix[-2*xstride];

        const int p0 = pix[-1*xstride];



        const int q0 = pix[ 0*xstride];

        const int q1 = pix[ 1*xstride];

        const int q2 = pix[ 2*xstride];



        if( FFABS( p0 - q0 ) < alpha &&

            FFABS( p1 - p0 ) < beta &&

            FFABS( q1 - q0 ) < beta ) {



            if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){

                if( FFABS( p2 - p0 ) < beta)

                {

                    const int p3 = pix[-4*xstride];

                    

                    pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3;

                    pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2;

                    pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3;

                } else {

                    

                    pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2;

                }

                if( FFABS( q2 - q0 ) < beta)

                {

                    const int q3 = pix[3*xstride];

                    

                    pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3;

                    pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2;

                    pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3;

                } else {

                    

                    pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2;

                }

            }else{

                

                pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2;

                pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2;

            }

        }

        pix += ystride;

    }

}

static av_always_inline VAR_0 void FUNC_0(uint8_t *VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)

{

    int VAR_6;

    for( VAR_6 = 0; VAR_6 < 16; VAR_6++ ) {

        const int VAR_7 = VAR_1[-3*VAR_2];

        const int VAR_8 = VAR_1[-2*VAR_2];

        const int VAR_9 = VAR_1[-1*VAR_2];



        const int VAR_10 = VAR_1[ 0*VAR_2];

        const int VAR_11 = VAR_1[ 1*VAR_2];

        const int VAR_12 = VAR_1[ 2*VAR_2];



        if( FFABS( VAR_9 - VAR_10 ) < VAR_4 &&

            FFABS( VAR_8 - VAR_9 ) < VAR_5 &&

            FFABS( VAR_11 - VAR_10 ) < VAR_5 ) {



            if(FFABS( VAR_9 - VAR_10 ) < (( VAR_4 >> 2 ) + 2 )){

                if( FFABS( VAR_7 - VAR_9 ) < VAR_5)

                {

                    const int VAR_13 = VAR_1[-4*VAR_2];

                    

                    VAR_1[-1*VAR_2] = ( VAR_7 + 2*VAR_8 + 2*VAR_9 + 2*VAR_10 + VAR_11 + 4 ) >> 3;

                    VAR_1[-2*VAR_2] = ( VAR_7 + VAR_8 + VAR_9 + VAR_10 + 2 ) >> 2;

                    VAR_1[-3*VAR_2] = ( 2*VAR_13 + 3*VAR_7 + VAR_8 + VAR_9 + VAR_10 + 4 ) >> 3;

                } else {

                    

                    VAR_1[-1*VAR_2] = ( 2*VAR_8 + VAR_9 + VAR_11 + 2 ) >> 2;

                }

                if( FFABS( VAR_12 - VAR_10 ) < VAR_5)

                {

                    const int VAR_14 = VAR_1[3*VAR_2];

                    

                    VAR_1[0*VAR_2] = ( VAR_8 + 2*VAR_9 + 2*VAR_10 + 2*VAR_11 + VAR_12 + 4 ) >> 3;

                    VAR_1[1*VAR_2] = ( VAR_9 + VAR_10 + VAR_11 + VAR_12 + 2 ) >> 2;

                    VAR_1[2*VAR_2] = ( 2*VAR_14 + 3*VAR_12 + VAR_11 + VAR_10 + VAR_9 + 4 ) >> 3;

                } else {

                    

                    VAR_1[0*VAR_2] = ( 2*VAR_11 + VAR_10 + VAR_8 + 2 ) >> 2;

                }

            }else{

                

                VAR_1[-1*VAR_2] = ( 2*VAR_8 + VAR_9 + VAR_11 + 2 ) >> 2;

                VAR_1[ 0*VAR_2] = ( 2*VAR_11 + VAR_10 + VAR_8 + 2 ) >> 2;

            }

        }

        VAR_1 += VAR_3;

    }

}

static av_always_inline VAR_0 void FUNC_0(uint8_t *VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{ int VAR_6; for( VAR_6 = 0; VAR_6 < 16; VAR_6++ ) { const int VAR_7 = VAR_1[-3*VAR_2]; const int VAR_8 = VAR_1[-2*VAR_2]; const int VAR_9 = VAR_1[-1*VAR_2]; const int VAR_10 = VAR_1[ 0*VAR_2]; const int VAR_11 = VAR_1[ 1*VAR_2]; const int VAR_12 = VAR_1[ 2*VAR_2]; if( FFABS( VAR_9 - VAR_10 ) < VAR_4 &&
FFABS( VAR_8 - VAR_9 ) < VAR_5 &&
FFABS( VAR_11 - VAR_10 ) < VAR_5 ) { if(FFABS( VAR_9 - VAR_10 ) < (( VAR_4 >> 2 ) + 2 )){ if( FFABS( VAR_7 - VAR_9 ) < VAR_5)
{ const int VAR_13 = VAR_1[-4*VAR_2]; VAR_1[-1*VAR_2] = ( VAR_7 + 2*VAR_8 + 2*VAR_9 + 2*VAR_10 + VAR_11 + 4 ) >> 3; VAR_1[-2*VAR_2] = ( VAR_7 + VAR_8 + VAR_9 + VAR_10 + 2 ) >> 2; VAR_1[-3*VAR_2] = ( 2*VAR_13 + 3*VAR_7 + VAR_8 + VAR_9 + VAR_10 + 4 ) >> 3; } else { VAR_1[-1*VAR_2] = ( 2*VAR_8 + VAR_9 + VAR_11 + 2 ) >> 2; } if( FFABS( VAR_12 - VAR_10 ) < VAR_5)
{ const int VAR_14 = VAR_1[3*VAR_2]; VAR_1[0*VAR_2] = ( VAR_8 + 2*VAR_9 + 2*VAR_10 + 2*VAR_11 + VAR_12 + 4 ) >> 3; VAR_1[1*VAR_2] = ( VAR_9 + VAR_10 + VAR_11 + VAR_12 + 2 ) >> 2; VAR_1[2*VAR_2] = ( 2*VAR_14 + 3*VAR_12 + VAR_11 + VAR_10 + VAR_9 + 4 ) >> 3; } else { VAR_1[0*VAR_2] = ( 2*VAR_11 + VAR_10 + VAR_8 + 2 ) >> 2; } }else{ VAR_1[-1*VAR_2] = ( 2*VAR_8 + VAR_9 + VAR_11 + 2 ) >> 2; VAR_1[ 0*VAR_2] = ( 2*VAR_11 + VAR_10 + VAR_8 + 2 ) >> 2; } } VAR_1 += VAR_3; } }