static void filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize) {

    MpegEncContext * const s = &h->s;

    int mb_xy, mb_type;

    int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh;



    mb_xy = mb_x + mb_y*s->mb_stride;



    if(mb_x==0 || mb_y==0 || !s->dsp.h264_loop_filter_strength ||

       (h->deblocking_filter == 2 && (h->slice_table[mb_xy] != h->slice_table[h->top_mb_xy] ||

                                      h->slice_table[mb_xy] != h->slice_table[mb_xy - 1]))) {

        filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize);

        return;

    }

    assert(!FRAME_MBAFF);



    mb_type = s->current_picture.mb_type[mb_xy];

    qp = s->current_picture.qscale_table[mb_xy];

    qp0 = s->current_picture.qscale_table[mb_xy-1];

    qp1 = s->current_picture.qscale_table[h->top_mb_xy];

    qpc = get_chroma_qp( h, qp );

    qpc0 = get_chroma_qp( h, qp0 );

    qpc1 = get_chroma_qp( h, qp1 );

    qp0 = (qp + qp0 + 1) >> 1;

    qp1 = (qp + qp1 + 1) >> 1;

    qpc0 = (qpc + qpc0 + 1) >> 1;

    qpc1 = (qpc + qpc1 + 1) >> 1;

    qp_thresh = 15 - h->slice_alpha_c0_offset;

    if(qp <= qp_thresh && qp0 <= qp_thresh && qp1 <= qp_thresh &&

       qpc <= qp_thresh && qpc0 <= qp_thresh && qpc1 <= qp_thresh)

        return;



    if( IS_INTRA(mb_type) ) {

        int16_t bS4[4] = {4,4,4,4};

        int16_t bS3[4] = {3,3,3,3};

        if( IS_8x8DCT(mb_type) ) {

            filter_mb_edgev( h, &img_y[4*0], linesize, bS4, qp0 );

            filter_mb_edgev( h, &img_y[4*2], linesize, bS3, qp );

            filter_mb_edgeh( h, &img_y[4*0*linesize], linesize, bS4, qp1 );

            filter_mb_edgeh( h, &img_y[4*2*linesize], linesize, bS3, qp );

        } else {

            filter_mb_edgev( h, &img_y[4*0], linesize, bS4, qp0 );

            filter_mb_edgev( h, &img_y[4*1], linesize, bS3, qp );

            filter_mb_edgev( h, &img_y[4*2], linesize, bS3, qp );

            filter_mb_edgev( h, &img_y[4*3], linesize, bS3, qp );

            filter_mb_edgeh( h, &img_y[4*0*linesize], linesize, bS4, qp1 );

            filter_mb_edgeh( h, &img_y[4*1*linesize], linesize, bS3, qp );

            filter_mb_edgeh( h, &img_y[4*2*linesize], linesize, bS3, qp );

            filter_mb_edgeh( h, &img_y[4*3*linesize], linesize, bS3, qp );

        }

        filter_mb_edgecv( h, &img_cb[2*0], uvlinesize, bS4, qpc0 );

        filter_mb_edgecv( h, &img_cb[2*2], uvlinesize, bS3, qpc );

        filter_mb_edgecv( h, &img_cr[2*0], uvlinesize, bS4, qpc0 );

        filter_mb_edgecv( h, &img_cr[2*2], uvlinesize, bS3, qpc );

        filter_mb_edgech( h, &img_cb[2*0*uvlinesize], uvlinesize, bS4, qpc1 );

        filter_mb_edgech( h, &img_cb[2*2*uvlinesize], uvlinesize, bS3, qpc );

        filter_mb_edgech( h, &img_cr[2*0*uvlinesize], uvlinesize, bS4, qpc1 );

        filter_mb_edgech( h, &img_cr[2*2*uvlinesize], uvlinesize, bS3, qpc );

        return;

    } else {

        DECLARE_ALIGNED_8(int16_t, bS[2][4][4]);

        uint64_t (*bSv)[4] = (uint64_t(*)[4])bS;

        int edges;

        if( IS_8x8DCT(mb_type) && (h->cbp&7) == 7 ) {

            edges = 4;

            bSv[0][0] = bSv[0][2] = bSv[1][0] = bSv[1][2] = 0x0002000200020002ULL;

        } else {

            int mask_edge1 = (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 :

                             (mb_type & MB_TYPE_16x8) ? 1 : 0;

            int mask_edge0 = (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16))

                             && (s->current_picture.mb_type[mb_xy-1] & (MB_TYPE_16x16 | MB_TYPE_8x16))

                             ? 3 : 0;

            int step = IS_8x8DCT(mb_type) ? 2 : 1;

            edges = (mb_type & MB_TYPE_16x16) && !(h->cbp & 15) ? 1 : 4;

            s->dsp.h264_loop_filter_strength( bS, h->non_zero_count_cache, h->ref_cache, h->mv_cache,

                                              (h->slice_type == B_TYPE), edges, step, mask_edge0, mask_edge1 );

        }

        if( IS_INTRA(s->current_picture.mb_type[mb_xy-1]) )

            bSv[0][0] = 0x0004000400040004ULL;

        if( IS_INTRA(s->current_picture.mb_type[h->top_mb_xy]) )

            bSv[1][0] = 0x0004000400040004ULL;



#define FILTER(hv,dir,edge)\

        if(bSv[dir][edge]) {\

            filter_mb_edge##hv( h, &img_y[4*edge*(dir?linesize:1)], linesize, bS[dir][edge], edge ? qp : qp##dir );\

            if(!(edge&1)) {\

                filter_mb_edgec##hv( h, &img_cb[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir );\

                filter_mb_edgec##hv( h, &img_cr[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir );\

            }\

        }

        if( edges == 1 ) {

            FILTER(v,0,0);

            FILTER(h,1,0);

        } else if( IS_8x8DCT(mb_type) ) {

            FILTER(v,0,0);

            FILTER(v,0,2);

            FILTER(h,1,0);

            FILTER(h,1,2);

        } else {

            FILTER(v,0,0);

            FILTER(v,0,1);

            FILTER(v,0,2);

            FILTER(v,0,3);

            FILTER(h,1,0);

            FILTER(h,1,1);

            FILTER(h,1,2);

            FILTER(h,1,3);

        }

#undef FILTER

    }

}

static void filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize) {

    MpegEncContext * const s = &h->s;

    int mb_xy, mb_type;

    int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh;



    mb_xy = mb_x + mb_y*s->mb_stride;



    if(mb_x==0 || mb_y==0 || !s->dsp.h264_loop_filter_strength ||

       (h->deblocking_filter == 2 && (h->slice_table[mb_xy] != h->slice_table[h->top_mb_xy] ||

                                      h->slice_table[mb_xy] != h->slice_table[mb_xy - 1]))) {

        filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize);

        return;

    }

    assert(!FRAME_MBAFF);



    mb_type = s->current_picture.mb_type[mb_xy];

    qp = s->current_picture.qscale_table[mb_xy];

    qp0 = s->current_picture.qscale_table[mb_xy-1];

    qp1 = s->current_picture.qscale_table[h->top_mb_xy];

    qpc = get_chroma_qp( h, qp );

    qpc0 = get_chroma_qp( h, qp0 );

    qpc1 = get_chroma_qp( h, qp1 );

    qp0 = (qp + qp0 + 1) >> 1;

    qp1 = (qp + qp1 + 1) >> 1;

    qpc0 = (qpc + qpc0 + 1) >> 1;

    qpc1 = (qpc + qpc1 + 1) >> 1;

    qp_thresh = 15 - h->slice_alpha_c0_offset;

    if(qp <= qp_thresh && qp0 <= qp_thresh && qp1 <= qp_thresh &&

       qpc <= qp_thresh && qpc0 <= qp_thresh && qpc1 <= qp_thresh)

        return;



    if( IS_INTRA(mb_type) ) {

        int16_t bS4[4] = {4,4,4,4};

        int16_t bS3[4] = {3,3,3,3};

        if( IS_8x8DCT(mb_type) ) {

            filter_mb_edgev( h, &img_y[4*0], linesize, bS4, qp0 );

            filter_mb_edgev( h, &img_y[4*2], linesize, bS3, qp );

            filter_mb_edgeh( h, &img_y[4*0*linesize], linesize, bS4, qp1 );

            filter_mb_edgeh( h, &img_y[4*2*linesize], linesize, bS3, qp );

        } else {

            filter_mb_edgev( h, &img_y[4*0], linesize, bS4, qp0 );

            filter_mb_edgev( h, &img_y[4*1], linesize, bS3, qp );

            filter_mb_edgev( h, &img_y[4*2], linesize, bS3, qp );

            filter_mb_edgev( h, &img_y[4*3], linesize, bS3, qp );

            filter_mb_edgeh( h, &img_y[4*0*linesize], linesize, bS4, qp1 );

            filter_mb_edgeh( h, &img_y[4*1*linesize], linesize, bS3, qp );

            filter_mb_edgeh( h, &img_y[4*2*linesize], linesize, bS3, qp );

            filter_mb_edgeh( h, &img_y[4*3*linesize], linesize, bS3, qp );

        }

        filter_mb_edgecv( h, &img_cb[2*0], uvlinesize, bS4, qpc0 );

        filter_mb_edgecv( h, &img_cb[2*2], uvlinesize, bS3, qpc );

        filter_mb_edgecv( h, &img_cr[2*0], uvlinesize, bS4, qpc0 );

        filter_mb_edgecv( h, &img_cr[2*2], uvlinesize, bS3, qpc );

        filter_mb_edgech( h, &img_cb[2*0*uvlinesize], uvlinesize, bS4, qpc1 );

        filter_mb_edgech( h, &img_cb[2*2*uvlinesize], uvlinesize, bS3, qpc );

        filter_mb_edgech( h, &img_cr[2*0*uvlinesize], uvlinesize, bS4, qpc1 );

        filter_mb_edgech( h, &img_cr[2*2*uvlinesize], uvlinesize, bS3, qpc );

        return;

    } else {

        DECLARE_ALIGNED_8(int16_t, bS[2][4][4]);

        uint64_t (*bSv)[4] = (uint64_t(*)[4])bS;

        int edges;

        if( IS_8x8DCT(mb_type) && (h->cbp&7) == 7 ) {

            edges = 4;

            bSv[0][0] = bSv[0][2] = bSv[1][0] = bSv[1][2] = 0x0002000200020002ULL;

        } else {

            int mask_edge1 = (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 :

                             (mb_type & MB_TYPE_16x8) ? 1 : 0;

            int mask_edge0 = (mb_type & (MB_TYPE_16x16 | MB_TYPE_8x16))

                             && (s->current_picture.mb_type[mb_xy-1] & (MB_TYPE_16x16 | MB_TYPE_8x16))

                             ? 3 : 0;

            int step = IS_8x8DCT(mb_type) ? 2 : 1;

            edges = (mb_type & MB_TYPE_16x16) && !(h->cbp & 15) ? 1 : 4;

            s->dsp.h264_loop_filter_strength( bS, h->non_zero_count_cache, h->ref_cache, h->mv_cache,

                                              (h->slice_type == B_TYPE), edges, step, mask_edge0, mask_edge1 );

        }

        if( IS_INTRA(s->current_picture.mb_type[mb_xy-1]) )

            bSv[0][0] = 0x0004000400040004ULL;

        if( IS_INTRA(s->current_picture.mb_type[h->top_mb_xy]) )

            bSv[1][0] = 0x0004000400040004ULL;



#define FILTER(hv,dir,edge)\

        if(bSv[dir][edge]) {\

            filter_mb_edge##hv( h, &img_y[4*edge*(dir?linesize:1)], linesize, bS[dir][edge], edge ? qp : qp##dir );\

            if(!(edge&1)) {\

                filter_mb_edgec##hv( h, &img_cb[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir );\

                filter_mb_edgec##hv( h, &img_cr[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir );\

            }\

        }

        if( edges == 1 ) {

            FILTER(v,0,0);

            FILTER(h,1,0);

        } else if( IS_8x8DCT(mb_type) ) {

            FILTER(v,0,0);

            FILTER(v,0,2);

            FILTER(h,1,0);

            FILTER(h,1,2);

        } else {

            FILTER(v,0,0);

            FILTER(v,0,1);

            FILTER(v,0,2);

            FILTER(v,0,3);

            FILTER(h,1,0);

            FILTER(h,1,1);

            FILTER(h,1,2);

            FILTER(h,1,3);

        }

#undef FILTER

    }

}

    if(mb_x==0 || mb_y==0 || !s->dsp.h264_loop_filter_strength ||     qpc = get_chroma_qp( h, qp );     qpc0 = get_chroma_qp( h, qp0 );     qpc1 = get_chroma_qp( h, qp1 );
static void FUNC_0( H264Context *VAR_0, int VAR_1, int VAR_2, uint8_t *VAR_3, uint8_t *VAR_4, uint8_t *VAR_5, unsigned int VAR_6, unsigned int VAR_7) {

    MpegEncContext * const s = &VAR_0->s;

    int VAR_8, VAR_9;

    int VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15, VAR_16;



    VAR_8 = VAR_1 + VAR_2*s->mb_stride;



    if(VAR_1==0 || VAR_2==0 || !s->dsp.h264_loop_filter_strength ||

       (VAR_0->deblocking_filter == 2 && (VAR_0->slice_table[VAR_8] != VAR_0->slice_table[VAR_0->top_mb_xy] ||

                                      VAR_0->slice_table[VAR_8] != VAR_0->slice_table[VAR_8 - 1]))) {

        filter_mb(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7);

        return;

    }

    assert(!FRAME_MBAFF);



    VAR_9 = s->current_picture.VAR_9[VAR_8];

    VAR_10 = s->current_picture.qscale_table[VAR_8];

    VAR_11 = s->current_picture.qscale_table[VAR_8-1];

    VAR_12 = s->current_picture.qscale_table[VAR_0->top_mb_xy];

    VAR_13 = get_chroma_qp( VAR_0, VAR_10 );

    VAR_14 = get_chroma_qp( VAR_0, VAR_11 );

    VAR_15 = get_chroma_qp( VAR_0, VAR_12 );

    VAR_11 = (VAR_10 + VAR_11 + 1) >> 1;

    VAR_12 = (VAR_10 + VAR_12 + 1) >> 1;

    VAR_14 = (VAR_13 + VAR_14 + 1) >> 1;

    VAR_15 = (VAR_13 + VAR_15 + 1) >> 1;

    VAR_16 = 15 - VAR_0->slice_alpha_c0_offset;

    if(VAR_10 <= VAR_16 && VAR_11 <= VAR_16 && VAR_12 <= VAR_16 &&

       VAR_13 <= VAR_16 && VAR_14 <= VAR_16 && VAR_15 <= VAR_16)

        return;



    if( IS_INTRA(VAR_9) ) {

        int16_t bS4[4] = {4,4,4,4};

        int16_t bS3[4] = {3,3,3,3};

        if( IS_8x8DCT(VAR_9) ) {

            filter_mb_edgev( VAR_0, &VAR_3[4*0], VAR_6, bS4, VAR_11 );

            filter_mb_edgev( VAR_0, &VAR_3[4*2], VAR_6, bS3, VAR_10 );

            filter_mb_edgeh( VAR_0, &VAR_3[4*0*VAR_6], VAR_6, bS4, VAR_12 );

            filter_mb_edgeh( VAR_0, &VAR_3[4*2*VAR_6], VAR_6, bS3, VAR_10 );

        } else {

            filter_mb_edgev( VAR_0, &VAR_3[4*0], VAR_6, bS4, VAR_11 );

            filter_mb_edgev( VAR_0, &VAR_3[4*1], VAR_6, bS3, VAR_10 );

            filter_mb_edgev( VAR_0, &VAR_3[4*2], VAR_6, bS3, VAR_10 );

            filter_mb_edgev( VAR_0, &VAR_3[4*3], VAR_6, bS3, VAR_10 );

            filter_mb_edgeh( VAR_0, &VAR_3[4*0*VAR_6], VAR_6, bS4, VAR_12 );

            filter_mb_edgeh( VAR_0, &VAR_3[4*1*VAR_6], VAR_6, bS3, VAR_10 );

            filter_mb_edgeh( VAR_0, &VAR_3[4*2*VAR_6], VAR_6, bS3, VAR_10 );

            filter_mb_edgeh( VAR_0, &VAR_3[4*3*VAR_6], VAR_6, bS3, VAR_10 );

        }

        filter_mb_edgecv( VAR_0, &VAR_4[2*0], VAR_7, bS4, VAR_14 );

        filter_mb_edgecv( VAR_0, &VAR_4[2*2], VAR_7, bS3, VAR_13 );

        filter_mb_edgecv( VAR_0, &VAR_5[2*0], VAR_7, bS4, VAR_14 );

        filter_mb_edgecv( VAR_0, &VAR_5[2*2], VAR_7, bS3, VAR_13 );

        filter_mb_edgech( VAR_0, &VAR_4[2*0*VAR_7], VAR_7, bS4, VAR_15 );

        filter_mb_edgech( VAR_0, &VAR_4[2*2*VAR_7], VAR_7, bS3, VAR_13 );

        filter_mb_edgech( VAR_0, &VAR_5[2*0*VAR_7], VAR_7, bS4, VAR_15 );

        filter_mb_edgech( VAR_0, &VAR_5[2*2*VAR_7], VAR_7, bS3, VAR_13 );

        return;

    } else {

        DECLARE_ALIGNED_8(int16_t, bS[2][4][4]);

        uint64_t (*bSv)[4] = (uint64_t(*)[4])bS;

        int VAR_17;

        if( IS_8x8DCT(VAR_9) && (VAR_0->cbp&7) == 7 ) {

            VAR_17 = 4;

            bSv[0][0] = bSv[0][2] = bSv[1][0] = bSv[1][2] = 0x0002000200020002ULL;

        } else {

            int VAR_18 = (VAR_9 & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 :

                             (VAR_9 & MB_TYPE_16x8) ? 1 : 0;

            int VAR_19 = (VAR_9 & (MB_TYPE_16x16 | MB_TYPE_8x16))

                             && (s->current_picture.VAR_9[VAR_8-1] & (MB_TYPE_16x16 | MB_TYPE_8x16))

                             ? 3 : 0;

            int VAR_20 = IS_8x8DCT(VAR_9) ? 2 : 1;

            VAR_17 = (VAR_9 & MB_TYPE_16x16) && !(VAR_0->cbp & 15) ? 1 : 4;

            s->dsp.h264_loop_filter_strength( bS, VAR_0->non_zero_count_cache, VAR_0->ref_cache, VAR_0->mv_cache,

                                              (VAR_0->slice_type == B_TYPE), VAR_17, VAR_20, VAR_19, VAR_18 );

        }

        if( IS_INTRA(s->current_picture.VAR_9[VAR_8-1]) )

            bSv[0][0] = 0x0004000400040004ULL;

        if( IS_INTRA(s->current_picture.VAR_9[VAR_0->top_mb_xy]) )

            bSv[1][0] = 0x0004000400040004ULL;



#define FILTER(hv,dir,edge)\

        if(bSv[dir][edge]) {\

            filter_mb_edge##hv( VAR_0, &VAR_3[4*edge*(dir?VAR_6:1)], VAR_6, bS[dir][edge], edge ? VAR_10 : VAR_10##dir );\

            if(!(edge&1)) {\

                filter_mb_edgec##hv( VAR_0, &VAR_4[2*edge*(dir?VAR_7:1)], VAR_7, bS[dir][edge], edge ? VAR_13 : VAR_13##dir );\

                filter_mb_edgec##hv( VAR_0, &VAR_5[2*edge*(dir?VAR_7:1)], VAR_7, bS[dir][edge], edge ? VAR_13 : VAR_13##dir );\

            }\

        }

        if( VAR_17 == 1 ) {

            FILTER(v,0,0);

            FILTER(VAR_0,1,0);

        } else if( IS_8x8DCT(VAR_9) ) {

            FILTER(v,0,0);

            FILTER(v,0,2);

            FILTER(VAR_0,1,0);

            FILTER(VAR_0,1,2);

        } else {

            FILTER(v,0,0);

            FILTER(v,0,1);

            FILTER(v,0,2);

            FILTER(v,0,3);

            FILTER(VAR_0,1,0);

            FILTER(VAR_0,1,1);

            FILTER(VAR_0,1,2);

            FILTER(VAR_0,1,3);

        }

#undef FILTER

    }

}

static void FUNC_0( H264Context *VAR_0, int VAR_1, int VAR_2, uint8_t *VAR_3, uint8_t *VAR_4, uint8_t *VAR_5, unsigned int VAR_6, unsigned int VAR_7) { MpegEncContext * const s = &VAR_0->s; int VAR_8, VAR_9; int VAR_10, VAR_11, VAR_12, VAR_13, VAR_14, VAR_15, VAR_16; VAR_8 = VAR_1 + VAR_2*s->mb_stride; if(VAR_1==0 || VAR_2==0 || !s->dsp.h264_loop_filter_strength ||
(VAR_0->deblocking_filter == 2 && (VAR_0->slice_table[VAR_8] != VAR_0->slice_table[VAR_0->top_mb_xy] ||
VAR_0->slice_table[VAR_8] != VAR_0->slice_table[VAR_8 - 1]))) { filter_mb(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7); return; } assert(!FRAME_MBAFF); VAR_9 = s->current_picture.VAR_9[VAR_8]; VAR_10 = s->current_picture.qscale_table[VAR_8]; VAR_11 = s->current_picture.qscale_table[VAR_8-1]; VAR_12 = s->current_picture.qscale_table[VAR_0->top_mb_xy]; VAR_13 = get_chroma_qp( VAR_0, VAR_10 ); VAR_14 = get_chroma_qp( VAR_0, VAR_11 ); VAR_15 = get_chroma_qp( VAR_0, VAR_12 ); VAR_11 = (VAR_10 + VAR_11 + 1) >> 1; VAR_12 = (VAR_10 + VAR_12 + 1) >> 1; VAR_14 = (VAR_13 + VAR_14 + 1) >> 1; VAR_15 = (VAR_13 + VAR_15 + 1) >> 1; VAR_16 = 15 - VAR_0->slice_alpha_c0_offset; if(VAR_10 <= VAR_16 && VAR_11 <= VAR_16 && VAR_12 <= VAR_16 &&
VAR_13 <= VAR_16 && VAR_14 <= VAR_16 && VAR_15 <= VAR_16)
return; if( IS_INTRA(VAR_9) ) { int16_t bS4[4] = {4,4,4,4}; int16_t bS3[4] = {3,3,3,3}; if( IS_8x8DCT(VAR_9) ) { filter_mb_edgev( VAR_0, &VAR_3[4*0], VAR_6, bS4, VAR_11 ); filter_mb_edgev( VAR_0, &VAR_3[4*2], VAR_6, bS3, VAR_10 ); filter_mb_edgeh( VAR_0, &VAR_3[4*0*VAR_6], VAR_6, bS4, VAR_12 ); filter_mb_edgeh( VAR_0, &VAR_3[4*2*VAR_6], VAR_6, bS3, VAR_10 ); } else { filter_mb_edgev( VAR_0, &VAR_3[4*0], VAR_6, bS4, VAR_11 ); filter_mb_edgev( VAR_0, &VAR_3[4*1], VAR_6, bS3, VAR_10 ); filter_mb_edgev( VAR_0, &VAR_3[4*2], VAR_6, bS3, VAR_10 ); filter_mb_edgev( VAR_0, &VAR_3[4*3], VAR_6, bS3, VAR_10 ); filter_mb_edgeh( VAR_0, &VAR_3[4*0*VAR_6], VAR_6, bS4, VAR_12 ); filter_mb_edgeh( VAR_0, &VAR_3[4*1*VAR_6], VAR_6, bS3, VAR_10 ); filter_mb_edgeh( VAR_0, &VAR_3[4*2*VAR_6], VAR_6, bS3, VAR_10 ); filter_mb_edgeh( VAR_0, &VAR_3[4*3*VAR_6], VAR_6, bS3, VAR_10 ); } filter_mb_edgecv( VAR_0, &VAR_4[2*0], VAR_7, bS4, VAR_14 ); filter_mb_edgecv( VAR_0, &VAR_4[2*2], VAR_7, bS3, VAR_13 ); filter_mb_edgecv( VAR_0, &VAR_5[2*0], VAR_7, bS4, VAR_14 ); filter_mb_edgecv( VAR_0, &VAR_5[2*2], VAR_7, bS3, VAR_13 ); filter_mb_edgech( VAR_0, &VAR_4[2*0*VAR_7], VAR_7, bS4, VAR_15 ); filter_mb_edgech( VAR_0, &VAR_4[2*2*VAR_7], VAR_7, bS3, VAR_13 ); filter_mb_edgech( VAR_0, &VAR_5[2*0*VAR_7], VAR_7, bS4, VAR_15 ); filter_mb_edgech( VAR_0, &VAR_5[2*2*VAR_7], VAR_7, bS3, VAR_13 ); return; } else { DECLARE_ALIGNED_8(int16_t, bS[2][4][4]); uint64_t (*bSv)[4] = (uint64_t(*)[4])bS; int VAR_17; if( IS_8x8DCT(VAR_9) && (VAR_0->cbp&7) == 7 ) { VAR_17 = 4; bSv[0][0] = bSv[0][2] = bSv[1][0] = bSv[1][2] = 0x0002000200020002ULL; } else { int VAR_18 = (VAR_9 & (MB_TYPE_16x16 | MB_TYPE_8x16)) ? 3 :
(VAR_9 & MB_TYPE_16x8) ? 1 : 0; int VAR_19 = (VAR_9 & (MB_TYPE_16x16 | MB_TYPE_8x16))
&& (s->current_picture.VAR_9[VAR_8-1] & (MB_TYPE_16x16 | MB_TYPE_8x16))
? 3 : 0; int VAR_20 = IS_8x8DCT(VAR_9) ? 2 : 1; VAR_17 = (VAR_9 & MB_TYPE_16x16) && !(VAR_0->cbp & 15) ? 1 : 4; s->dsp.h264_loop_filter_strength( bS, VAR_0->non_zero_count_cache, VAR_0->ref_cache, VAR_0->mv_cache,
(VAR_0->slice_type == B_TYPE), VAR_17, VAR_20, VAR_19, VAR_18 ); } if( IS_INTRA(s->current_picture.VAR_9[VAR_8-1]) )
bSv[0][0] = 0x0004000400040004ULL; if( IS_INTRA(s->current_picture.VAR_9[VAR_0->top_mb_xy]) )
bSv[1][0] = 0x0004000400040004ULL; #define FILTER(hv,dir,edge)\
if(bSv[dir][edge]) {\ filter_mb_edge##hv( VAR_0, &VAR_3[4*edge*(dir?VAR_6:1)], VAR_6, bS[dir][edge], edge ? VAR_10 : VAR_10##dir );\ if(!(edge&1)) {\ filter_mb_edgec##hv( VAR_0, &VAR_4[2*edge*(dir?VAR_7:1)], VAR_7, bS[dir][edge], edge ? VAR_13 : VAR_13##dir );\ filter_mb_edgec##hv( VAR_0, &VAR_5[2*edge*(dir?VAR_7:1)], VAR_7, bS[dir][edge], edge ? VAR_13 : VAR_13##dir );\ }\ } if( VAR_17 == 1 ) { FILTER(v,0,0); FILTER(VAR_0,1,0); } else if( IS_8x8DCT(VAR_9) ) { FILTER(v,0,0); FILTER(v,0,2); FILTER(VAR_0,1,0); FILTER(VAR_0,1,2); } else { FILTER(v,0,0); FILTER(v,0,1); FILTER(v,0,2); FILTER(v,0,3); FILTER(VAR_0,1,0); FILTER(VAR_0,1,1); FILTER(VAR_0,1,2); FILTER(VAR_0,1,3); } #undef FILTER
} }