static int skip_check(MpegEncContext *s, Picture *p, Picture *ref)

{

    int x, y, plane;

    int score = 0;

    int64_t score64 = 0;



    for (plane = 0; plane < 3; plane++) {

        const int stride = p->f.linesize[plane];

        const int bw = plane ? 1 : 2;

        for (y = 0; y < s->mb_height * bw; y++) {

            for (x = 0; x < s->mb_width * bw; x++) {

                int off = p->shared ? 0 : 16;

                uint8_t *dptr = p->f.data[plane] + 8 * (x + y * stride) + off;

                uint8_t *rptr = ref->f.data[plane] + 8 * (x + y * stride);

                int v   = s->dsp.frame_skip_cmp[1](s, dptr, rptr, stride, 8);



                switch (s->avctx->frame_skip_exp) {

                case 0: score    =  FFMAX(score, v);          break;

                case 1: score   += FFABS(v);                  break;

                case 2: score   += v * v;                     break;

                case 3: score64 += FFABS(v * v * (int64_t)v); break;

                case 4: score64 += v * v * (int64_t)(v * v);  break;

                }

            }

        }

    }



    if (score)

        score64 = score;



    if (score64 < s->avctx->frame_skip_threshold)

        return 1;

    if (score64 < ((s->avctx->frame_skip_factor * (int64_t)s->lambda) >> 8))

        return 1;

    return 0;

}

static int skip_check(MpegEncContext *s, Picture *p, Picture *ref)

{

    int x, y, plane;

    int score = 0;

    int64_t score64 = 0;



    for (plane = 0; plane < 3; plane++) {

        const int stride = p->f.linesize[plane];

        const int bw = plane ? 1 : 2;

        for (y = 0; y < s->mb_height * bw; y++) {

            for (x = 0; x < s->mb_width * bw; x++) {

                int off = p->shared ? 0 : 16;

                uint8_t *dptr = p->f.data[plane] + 8 * (x + y * stride) + off;

                uint8_t *rptr = ref->f.data[plane] + 8 * (x + y * stride);

                int v   = s->dsp.frame_skip_cmp[1](s, dptr, rptr, stride, 8);



                switch (s->avctx->frame_skip_exp) {

                case 0: score    =  FFMAX(score, v);          break;

                case 1: score   += FFABS(v);                  break;

                case 2: score   += v * v;                     break;

                case 3: score64 += FFABS(v * v * (int64_t)v); break;

                case 4: score64 += v * v * (int64_t)(v * v);  break;

                }

            }

        }

    }



    if (score)

        score64 = score;



    if (score64 < s->avctx->frame_skip_threshold)

        return 1;

    if (score64 < ((s->avctx->frame_skip_factor * (int64_t)s->lambda) >> 8))

        return 1;

    return 0;

}

        const int stride = p->f.linesize[plane];                 uint8_t *dptr = p->f.data[plane] + 8 * (x + y * stride) + off;                 uint8_t *rptr = ref->f.data[plane] + 8 * (x + y * stride);
static int FUNC_0(MpegEncContext *VAR_0, Picture *VAR_1, Picture *VAR_2)

{

    int VAR_3, VAR_4, VAR_5;

    int VAR_6 = 0;

    int64_t score64 = 0;



    for (VAR_5 = 0; VAR_5 < 3; VAR_5++) {

        const int VAR_7 = VAR_1->f.linesize[VAR_5];

        const int VAR_8 = VAR_5 ? 1 : 2;

        for (VAR_4 = 0; VAR_4 < VAR_0->mb_height * VAR_8; VAR_4++) {

            for (VAR_3 = 0; VAR_3 < VAR_0->mb_width * VAR_8; VAR_3++) {

                int off = VAR_1->shared ? 0 : 16;

                uint8_t *dptr = VAR_1->f.data[VAR_5] + 8 * (VAR_3 + VAR_4 * VAR_7) + off;

                uint8_t *rptr = VAR_2->f.data[VAR_5] + 8 * (VAR_3 + VAR_4 * VAR_7);

                int v   = VAR_0->dsp.frame_skip_cmp[1](VAR_0, dptr, rptr, VAR_7, 8);



                switch (VAR_0->avctx->frame_skip_exp) {

                case 0: VAR_6    =  FFMAX(VAR_6, v);          break;

                case 1: VAR_6   += FFABS(v);                  break;

                case 2: VAR_6   += v * v;                     break;

                case 3: score64 += FFABS(v * v * (int64_t)v); break;

                case 4: score64 += v * v * (int64_t)(v * v);  break;

                }

            }

        }

    }



    if (VAR_6)

        score64 = VAR_6;



    if (score64 < VAR_0->avctx->frame_skip_threshold)

        return 1;

    if (score64 < ((VAR_0->avctx->frame_skip_factor * (int64_t)VAR_0->lambda) >> 8))

        return 1;

    return 0;

}

static int FUNC_0(MpegEncContext *VAR_0, Picture *VAR_1, Picture *VAR_2)
{ int VAR_3, VAR_4, VAR_5; int VAR_6 = 0; int64_t score64 = 0; for (VAR_5 = 0; VAR_5 < 3; VAR_5++) { const int VAR_7 = VAR_1->f.linesize[VAR_5]; const int VAR_8 = VAR_5 ? 1 : 2; for (VAR_4 = 0; VAR_4 < VAR_0->mb_height * VAR_8; VAR_4++) { for (VAR_3 = 0; VAR_3 < VAR_0->mb_width * VAR_8; VAR_3++) { int off = VAR_1->shared ? 0 : 16; uint8_t *dptr = VAR_1->f.data[VAR_5] + 8 * (VAR_3 + VAR_4 * VAR_7) + off; uint8_t *rptr = VAR_2->f.data[VAR_5] + 8 * (VAR_3 + VAR_4 * VAR_7); int v   = VAR_0->dsp.frame_skip_cmp[1](VAR_0, dptr, rptr, VAR_7, 8); switch (VAR_0->avctx->frame_skip_exp) { case 0: VAR_6    =  FFMAX(VAR_6, v);          break; case 1: VAR_6   += FFABS(v);                  break; case 2: VAR_6   += v * v;                     break; case 3: score64 += FFABS(v * v * (int64_t)v); break; case 4: score64 += v * v * (int64_t)(v * v);  break; } } } } if (VAR_6)
score64 = VAR_6; if (score64 < VAR_0->avctx->frame_skip_threshold)
return 1; if (score64 < ((VAR_0->avctx->frame_skip_factor * (int64_t)VAR_0->lambda) >> 8))
return 1; return 0; }