void compute_images_mse(PSNRContext *s,

                        const uint8_t *main_data[4], const int main_linesizes[4],

                        const uint8_t *ref_data[4], const int ref_linesizes[4],

                        int w, int h, double mse[4])

{

    int i, c, j;



    for (c = 0; c < s->nb_components; c++) {

        const int outw = s->planewidth[c];

        const int outh = s->planeheight[c];

        const uint8_t *main_line = main_data[c];

        const uint8_t *ref_line = ref_data[c];

        const int ref_linesize = ref_linesizes[c];

        const int main_linesize = main_linesizes[c];

        int m = 0;



        for (i = 0; i < outh; i++) {

            for (j = 0; j < outw; j++)

                m += pow2(main_line[j] - ref_line[j]);

            ref_line += ref_linesize;

            main_line += main_linesize;

        }

        mse[c] = m / (double)(outw * outh);

    }

}

void compute_images_mse(PSNRContext *s,

                        const uint8_t *main_data[4], const int main_linesizes[4],

                        const uint8_t *ref_data[4], const int ref_linesizes[4],

                        int w, int h, double mse[4])

{

    int i, c, j;



    for (c = 0; c < s->nb_components; c++) {

        const int outw = s->planewidth[c];

        const int outh = s->planeheight[c];

        const uint8_t *main_line = main_data[c];

        const uint8_t *ref_line = ref_data[c];

        const int ref_linesize = ref_linesizes[c];

        const int main_linesize = main_linesizes[c];

        int m = 0;



        for (i = 0; i < outh; i++) {

            for (j = 0; j < outw; j++)

                m += pow2(main_line[j] - ref_line[j]);

            ref_line += ref_linesize;

            main_line += main_linesize;

        }

        mse[c] = m / (double)(outw * outh);

    }

}

        int m = 0;
void FUNC_0(PSNRContext *VAR_0,

                        const uint8_t *VAR_1[4], const int VAR_2[4],

                        const uint8_t *VAR_3[4], const int VAR_4[4],

                        int VAR_5, int VAR_6, double VAR_7[4])

{

    int VAR_8, VAR_9, VAR_10;



    for (VAR_9 = 0; VAR_9 < VAR_0->nb_components; VAR_9++) {

        const int outw = VAR_0->planewidth[VAR_9];

        const int outh = VAR_0->planeheight[VAR_9];

        const uint8_t *main_line = VAR_1[VAR_9];

        const uint8_t *ref_line = VAR_3[VAR_9];

        const int ref_linesize = VAR_4[VAR_9];

        const int main_linesize = VAR_2[VAR_9];

        int m = 0;



        for (VAR_8 = 0; VAR_8 < outh; VAR_8++) {

            for (VAR_10 = 0; VAR_10 < outw; VAR_10++)

                m += pow2(main_line[VAR_10] - ref_line[VAR_10]);

            ref_line += ref_linesize;

            main_line += main_linesize;

        }

        VAR_7[VAR_9] = m / (double)(outw * outh);

    }

}

void FUNC_0(PSNRContext *VAR_0,
const uint8_t *VAR_1[4], const int VAR_2[4],
const uint8_t *VAR_3[4], const int VAR_4[4],
int VAR_5, int VAR_6, double VAR_7[4])
{ int VAR_8, VAR_9, VAR_10; for (VAR_9 = 0; VAR_9 < VAR_0->nb_components; VAR_9++) { const int outw = VAR_0->planewidth[VAR_9]; const int outh = VAR_0->planeheight[VAR_9]; const uint8_t *main_line = VAR_1[VAR_9]; const uint8_t *ref_line = VAR_3[VAR_9]; const int ref_linesize = VAR_4[VAR_9]; const int main_linesize = VAR_2[VAR_9]; int m = 0; for (VAR_8 = 0; VAR_8 < outh; VAR_8++) { for (VAR_10 = 0; VAR_10 < outw; VAR_10++) m += pow2(main_line[VAR_10] - ref_line[VAR_10]); ref_line += ref_linesize; main_line += main_linesize; } VAR_7[VAR_9] = m / (double)(outw * outh); } }