static void filter_mb_mbaff_edgecv( H264Context *h, uint8_t *pix, int stride, const int16_t bS[7], int bsi, int qp ) {

    const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);

    int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset;

    int alpha = alpha_table[index_a];

    int beta  = beta_table[qp - qp_bd_offset + h->slice_beta_offset];

    if (alpha ==0 || beta == 0) return;



    if( bS[0] < 4 ) {

        int8_t tc[4];

        tc[0] = tc0_table[index_a][bS[0*bsi]] + 1;

        tc[1] = tc0_table[index_a][bS[1*bsi]] + 1;

        tc[2] = tc0_table[index_a][bS[2*bsi]] + 1;

        tc[3] = tc0_table[index_a][bS[3*bsi]] + 1;

        h->h264dsp.h264_h_loop_filter_chroma_mbaff(pix, stride, alpha, beta, tc);

    } else {

        h->h264dsp.h264_h_loop_filter_chroma_mbaff_intra(pix, stride, alpha, beta);

    }

}

static void filter_mb_mbaff_edgecv( H264Context *h, uint8_t *pix, int stride, const int16_t bS[7], int bsi, int qp ) {

    const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);

    int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset;

    int alpha = alpha_table[index_a];

    int beta  = beta_table[qp - qp_bd_offset + h->slice_beta_offset];

    if (alpha ==0 || beta == 0) return;



    if( bS[0] < 4 ) {

        int8_t tc[4];

        tc[0] = tc0_table[index_a][bS[0*bsi]] + 1;

        tc[1] = tc0_table[index_a][bS[1*bsi]] + 1;

        tc[2] = tc0_table[index_a][bS[2*bsi]] + 1;

        tc[3] = tc0_table[index_a][bS[3*bsi]] + 1;

        h->h264dsp.h264_h_loop_filter_chroma_mbaff(pix, stride, alpha, beta, tc);

    } else {

        h->h264dsp.h264_h_loop_filter_chroma_mbaff_intra(pix, stride, alpha, beta);

    }

}

static void FUNC_0( H264Context *VAR_0, uint8_t *VAR_1, int VAR_2, const int16_t VAR_3[7], int VAR_4, int VAR_5 ) {

    const int VAR_6 = 6 * (VAR_0->sps.bit_depth_luma - 8);

    int VAR_7 = VAR_5 - VAR_6 + VAR_0->slice_alpha_c0_offset;

    int VAR_8 = alpha_table[VAR_7];

    int VAR_9  = beta_table[VAR_5 - VAR_6 + VAR_0->slice_beta_offset];

    if (VAR_8 ==0 || VAR_9 == 0) return;



    if( VAR_3[0] < 4 ) {

        int8_t tc[4];

        tc[0] = tc0_table[VAR_7][VAR_3[0*VAR_4]] + 1;

        tc[1] = tc0_table[VAR_7][VAR_3[1*VAR_4]] + 1;

        tc[2] = tc0_table[VAR_7][VAR_3[2*VAR_4]] + 1;

        tc[3] = tc0_table[VAR_7][VAR_3[3*VAR_4]] + 1;

        VAR_0->h264dsp.h264_h_loop_filter_chroma_mbaff(VAR_1, VAR_2, VAR_8, VAR_9, tc);

    } else {

        VAR_0->h264dsp.h264_h_loop_filter_chroma_mbaff_intra(VAR_1, VAR_2, VAR_8, VAR_9);

    }

}

static void FUNC_0( H264Context *VAR_0, uint8_t *VAR_1, int VAR_2, const int16_t VAR_3[7], int VAR_4, int VAR_5 ) { const int VAR_6 = 6 * (VAR_0->sps.bit_depth_luma - 8); int VAR_7 = VAR_5 - VAR_6 + VAR_0->slice_alpha_c0_offset; int VAR_8 = alpha_table[VAR_7]; int VAR_9  = beta_table[VAR_5 - VAR_6 + VAR_0->slice_beta_offset]; if (VAR_8 ==0 || VAR_9 == 0) return; if( VAR_3[0] < 4 ) { int8_t tc[4]; tc[0] = tc0_table[VAR_7][VAR_3[0*VAR_4]] + 1; tc[1] = tc0_table[VAR_7][VAR_3[1*VAR_4]] + 1; tc[2] = tc0_table[VAR_7][VAR_3[2*VAR_4]] + 1; tc[3] = tc0_table[VAR_7][VAR_3[3*VAR_4]] + 1; VAR_0->h264dsp.h264_h_loop_filter_chroma_mbaff(VAR_1, VAR_2, VAR_8, VAR_9, tc); } else { VAR_0->h264dsp.h264_h_loop_filter_chroma_mbaff_intra(VAR_1, VAR_2, VAR_8, VAR_9); } }