static void avc_h_loop_filter_chroma422_mbaff_msa(uint8_t *src,

                                                  int32_t stride,

                                                  int32_t alpha_in,

                                                  int32_t beta_in,

                                                  int8_t *tc0)

{

    int32_t col, tc_val;

    int16_t out0, out1;

    v16u8 alpha, beta, res;



    alpha = (v16u8) __msa_fill_b(alpha_in);

    beta = (v16u8) __msa_fill_b(beta_in);



    for (col = 0; col < 4; col++) {

        tc_val = (tc0[col] - 1) + 1;



        if (tc_val <= 0) {

            src += 4 * stride;

            continue;

        }



        AVC_LPF_H_2BYTE_CHROMA_422(src, stride, tc_val, alpha, beta, res);



        out0 = __msa_copy_s_h((v8i16) res, 0);

        out1 = __msa_copy_s_h((v8i16) res, 1);



        STORE_HWORD((src - 1), out0);

        src += stride;

        STORE_HWORD((src - 1), out1);

        src += stride;

    }

}

static void avc_h_loop_filter_chroma422_mbaff_msa(uint8_t *src,

                                                  int32_t stride,

                                                  int32_t alpha_in,

                                                  int32_t beta_in,

                                                  int8_t *tc0)

{

    int32_t col, tc_val;

    int16_t out0, out1;

    v16u8 alpha, beta, res;



    alpha = (v16u8) __msa_fill_b(alpha_in);

    beta = (v16u8) __msa_fill_b(beta_in);



    for (col = 0; col < 4; col++) {

        tc_val = (tc0[col] - 1) + 1;



        if (tc_val <= 0) {

            src += 4 * stride;

            continue;

        }



        AVC_LPF_H_2BYTE_CHROMA_422(src, stride, tc_val, alpha, beta, res);



        out0 = __msa_copy_s_h((v8i16) res, 0);

        out1 = __msa_copy_s_h((v8i16) res, 1);



        STORE_HWORD((src - 1), out0);

        src += stride;

        STORE_HWORD((src - 1), out1);

        src += stride;

    }

}

static void FUNC_0(uint8_t *VAR_0,

                                                  int32_t VAR_1,

                                                  int32_t VAR_2,

                                                  int32_t VAR_3,

                                                  int8_t *VAR_4)

{

    int32_t col, tc_val;

    int16_t out0, out1;

    v16u8 alpha, beta, res;



    alpha = (v16u8) __msa_fill_b(VAR_2);

    beta = (v16u8) __msa_fill_b(VAR_3);



    for (col = 0; col < 4; col++) {

        tc_val = (VAR_4[col] - 1) + 1;



        if (tc_val <= 0) {

            VAR_0 += 4 * VAR_1;

            continue;

        }



        AVC_LPF_H_2BYTE_CHROMA_422(VAR_0, VAR_1, tc_val, alpha, beta, res);



        out0 = __msa_copy_s_h((v8i16) res, 0);

        out1 = __msa_copy_s_h((v8i16) res, 1);



        STORE_HWORD((VAR_0 - 1), out0);

        VAR_0 += VAR_1;

        STORE_HWORD((VAR_0 - 1), out1);

        VAR_0 += VAR_1;

    }

}

static void FUNC_0(uint8_t *VAR_0,
int32_t VAR_1,
int32_t VAR_2,
int32_t VAR_3,
int8_t *VAR_4)
{ int32_t col, tc_val; int16_t out0, out1; v16u8 alpha, beta, res; alpha = (v16u8) __msa_fill_b(VAR_2); beta = (v16u8) __msa_fill_b(VAR_3); for (col = 0; col < 4; col++) { tc_val = (VAR_4[col] - 1) + 1; if (tc_val <= 0) { VAR_0 += 4 * VAR_1; continue; } AVC_LPF_H_2BYTE_CHROMA_422(VAR_0, VAR_1, tc_val, alpha, beta, res); out0 = __msa_copy_s_h((v8i16) res, 0); out1 = __msa_copy_s_h((v8i16) res, 1); STORE_HWORD((VAR_0 - 1), out0); VAR_0 += VAR_1; STORE_HWORD((VAR_0 - 1), out1); VAR_0 += VAR_1; } }