static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,

                  enum AVPixelFormat srcFormat, enum AVPixelFormat dstFormat,

                  int srcW, int srcH, int dstW, int dstH, int flags,

                  struct Results *r)

{

    static enum AVPixelFormat cur_srcFormat;

    static int cur_srcW, cur_srcH;

    static uint8_t *src[4];

    static int srcStride[4];

    uint8_t *dst[4] = { 0 };

    uint8_t *out[4] = { 0 };

    int dstStride[4];

    int i;

    uint64_t ssdY, ssdU = 0, ssdV = 0, ssdA = 0;

    struct SwsContext *dstContext = NULL, *outContext = NULL;

    uint32_t crc = 0;

    int res      = 0;



    if (cur_srcFormat != srcFormat || cur_srcW != srcW || cur_srcH != srcH) {

        struct SwsContext *srcContext = NULL;

        int p;



        for (p = 0; p < 4; p++)

            av_freep(&src[p]);



        av_image_fill_linesizes(srcStride, srcFormat, srcW);

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

            srcStride[p] = FFALIGN(srcStride[p], 16);

            if (srcStride[p])

                src[p] = av_mallocz(srcStride[p] * srcH + 16);

            if (srcStride[p] && !src[p]) {

                perror("Malloc");

                res = -1;

                goto end;

            }

        }

        srcContext = sws_getContext(w, h, AV_PIX_FMT_YUVA420P, srcW, srcH,

                                    srcFormat, SWS_BILINEAR, NULL, NULL, NULL);

        if (!srcContext) {

            fprintf(stderr, "Failed to get %s ---> %s\n",

                    av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name,

                    av_pix_fmt_descriptors[srcFormat].name);

            res = -1;

            goto end;

        }

        sws_scale(srcContext, ref, refStride, 0, h, src, srcStride);

        sws_freeContext(srcContext);



        cur_srcFormat = srcFormat;

        cur_srcW      = srcW;

        cur_srcH      = srcH;

    }



    av_image_fill_linesizes(dstStride, dstFormat, dstW);

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

        /* Image buffers passed into libswscale can be allocated any way you

         * prefer, as long as they're aligned enough for the architecture, and

         * they're freed appropriately (such as using av_free for buffers

         * allocated with av_malloc). */

        /* An extra 16 bytes is being allocated because some scalers may write

         * out of bounds. */

        dstStride[i] = FFALIGN(dstStride[i], 16);

        if (dstStride[i])

            dst[i] = av_mallocz(dstStride[i] * dstH + 16);

        if (dstStride[i] && !dst[i]) {

            perror("Malloc");

            res = -1;



            goto end;

        }

    }



    dstContext = sws_getContext(srcW, srcH, srcFormat, dstW, dstH, dstFormat,

                                flags, NULL, NULL, NULL);

    if (!dstContext) {

        fprintf(stderr, "Failed to get %s ---> %s\n",

                av_pix_fmt_descriptors[srcFormat].name,

                av_pix_fmt_descriptors[dstFormat].name);

        res = -1;

        goto end;

    }



    printf(" %s %dx%d -> %s %3dx%3d flags=%2d",

           av_pix_fmt_descriptors[srcFormat].name, srcW, srcH,

           av_pix_fmt_descriptors[dstFormat].name, dstW, dstH,

           flags);

    fflush(stdout);



    sws_scale(dstContext, src, srcStride, 0, srcH, dst, dstStride);



    for (i = 0; i < 4 && dstStride[i]; i++)

        crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[i],

                     dstStride[i] * dstH);



    if (r && crc == r->crc) {

        ssdY = r->ssdY;

        ssdU = r->ssdU;

        ssdV = r->ssdV;

        ssdA = r->ssdA;

    } else {

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

            refStride[i] = FFALIGN(refStride[i], 16);

            if (refStride[i])

                out[i] = av_mallocz(refStride[i] * h);

            if (refStride[i] && !out[i]) {

                perror("Malloc");

                res = -1;

                goto end;

            }

        }

        outContext = sws_getContext(dstW, dstH, dstFormat, w, h,

                                    AV_PIX_FMT_YUVA420P, SWS_BILINEAR,

                                    NULL, NULL, NULL);

        if (!outContext) {

            fprintf(stderr, "Failed to get %s ---> %s\n",

                    av_pix_fmt_descriptors[dstFormat].name,

                    av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name);

            res = -1;

            goto end;

        }

        sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride);



        ssdY = getSSD(ref[0], out[0], refStride[0], refStride[0], w, h);

        if (hasChroma(srcFormat) && hasChroma(dstFormat)) {

            //FIXME check that output is really gray

            ssdU = getSSD(ref[1], out[1], refStride[1], refStride[1],

                          (w + 1) >> 1, (h + 1) >> 1);

            ssdV = getSSD(ref[2], out[2], refStride[2], refStride[2],

                          (w + 1) >> 1, (h + 1) >> 1);

        }

        if (isALPHA(srcFormat) && isALPHA(dstFormat))

            ssdA = getSSD(ref[3], out[3], refStride[3], refStride[3], w, h);



        ssdY /= w * h;

        ssdU /= w * h / 4;

        ssdV /= w * h / 4;

        ssdA /= w * h;



        sws_freeContext(outContext);



        for (i = 0; i < 4; i++)

            if (refStride[i])

                av_free(out[i]);

    }



    printf(" CRC=%08x SSD=%5"PRId64 ",%5"PRId64 ",%5"PRId64 ",%5"PRId64 "\n",

           crc, ssdY, ssdU, ssdV, ssdA);



end:

    sws_freeContext(dstContext);



    for (i = 0; i < 4; i++)

        if (dstStride[i])

            av_free(dst[i]);



    return res;

}

static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,

                  enum AVPixelFormat srcFormat, enum AVPixelFormat dstFormat,

                  int srcW, int srcH, int dstW, int dstH, int flags,

                  struct Results *r)

{

    static enum AVPixelFormat cur_srcFormat;

    static int cur_srcW, cur_srcH;

    static uint8_t *src[4];

    static int srcStride[4];

    uint8_t *dst[4] = { 0 };

    uint8_t *out[4] = { 0 };

    int dstStride[4];

    int i;

    uint64_t ssdY, ssdU = 0, ssdV = 0, ssdA = 0;

    struct SwsContext *dstContext = NULL, *outContext = NULL;

    uint32_t crc = 0;

    int res      = 0;



    if (cur_srcFormat != srcFormat || cur_srcW != srcW || cur_srcH != srcH) {

        struct SwsContext *srcContext = NULL;

        int p;



        for (p = 0; p < 4; p++)

            av_freep(&src[p]);



        av_image_fill_linesizes(srcStride, srcFormat, srcW);

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

            srcStride[p] = FFALIGN(srcStride[p], 16);

            if (srcStride[p])

                src[p] = av_mallocz(srcStride[p] * srcH + 16);

            if (srcStride[p] && !src[p]) {

                perror("Malloc");

                res = -1;

                goto end;

            }

        }

        srcContext = sws_getContext(w, h, AV_PIX_FMT_YUVA420P, srcW, srcH,

                                    srcFormat, SWS_BILINEAR, NULL, NULL, NULL);

        if (!srcContext) {

            fprintf(stderr, "Failed to get %s ---> %s\n",

                    av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name,

                    av_pix_fmt_descriptors[srcFormat].name);

            res = -1;

            goto end;

        }

        sws_scale(srcContext, ref, refStride, 0, h, src, srcStride);

        sws_freeContext(srcContext);



        cur_srcFormat = srcFormat;

        cur_srcW      = srcW;

        cur_srcH      = srcH;

    }



    av_image_fill_linesizes(dstStride, dstFormat, dstW);

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

        







        



        dstStride[i] = FFALIGN(dstStride[i], 16);

        if (dstStride[i])

            dst[i] = av_mallocz(dstStride[i] * dstH + 16);

        if (dstStride[i] && !dst[i]) {

            perror("Malloc");

            res = -1;



            goto end;

        }

    }



    dstContext = sws_getContext(srcW, srcH, srcFormat, dstW, dstH, dstFormat,

                                flags, NULL, NULL, NULL);

    if (!dstContext) {

        fprintf(stderr, "Failed to get %s ---> %s\n",

                av_pix_fmt_descriptors[srcFormat].name,

                av_pix_fmt_descriptors[dstFormat].name);

        res = -1;

        goto end;

    }



    printf(" %s %dx%d -> %s %3dx%3d flags=%2d",

           av_pix_fmt_descriptors[srcFormat].name, srcW, srcH,

           av_pix_fmt_descriptors[dstFormat].name, dstW, dstH,

           flags);

    fflush(stdout);



    sws_scale(dstContext, src, srcStride, 0, srcH, dst, dstStride);



    for (i = 0; i < 4 && dstStride[i]; i++)

        crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[i],

                     dstStride[i] * dstH);



    if (r && crc == r->crc) {

        ssdY = r->ssdY;

        ssdU = r->ssdU;

        ssdV = r->ssdV;

        ssdA = r->ssdA;

    } else {

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

            refStride[i] = FFALIGN(refStride[i], 16);

            if (refStride[i])

                out[i] = av_mallocz(refStride[i] * h);

            if (refStride[i] && !out[i]) {

                perror("Malloc");

                res = -1;

                goto end;

            }

        }

        outContext = sws_getContext(dstW, dstH, dstFormat, w, h,

                                    AV_PIX_FMT_YUVA420P, SWS_BILINEAR,

                                    NULL, NULL, NULL);

        if (!outContext) {

            fprintf(stderr, "Failed to get %s ---> %s\n",

                    av_pix_fmt_descriptors[dstFormat].name,

                    av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name);

            res = -1;

            goto end;

        }

        sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride);



        ssdY = getSSD(ref[0], out[0], refStride[0], refStride[0], w, h);

        if (hasChroma(srcFormat) && hasChroma(dstFormat)) {

            

            ssdU = getSSD(ref[1], out[1], refStride[1], refStride[1],

                          (w + 1) >> 1, (h + 1) >> 1);

            ssdV = getSSD(ref[2], out[2], refStride[2], refStride[2],

                          (w + 1) >> 1, (h + 1) >> 1);

        }

        if (isALPHA(srcFormat) && isALPHA(dstFormat))

            ssdA = getSSD(ref[3], out[3], refStride[3], refStride[3], w, h);



        ssdY /= w * h;

        ssdU /= w * h / 4;

        ssdV /= w * h / 4;

        ssdA /= w * h;



        sws_freeContext(outContext);



        for (i = 0; i < 4; i++)

            if (refStride[i])

                av_free(out[i]);

    }



    printf(" CRC=%08x SSD=%5"PRId64 ",%5"PRId64 ",%5"PRId64 ",%5"PRId64 "\n",

           crc, ssdY, ssdU, ssdV, ssdA);



end:

    sws_freeContext(dstContext);



    for (i = 0; i < 4; i++)

        if (dstStride[i])

            av_free(dst[i]);



    return res;

}

    int dstStride[4];
static int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4], int VAR_2, int VAR_3,

                  enum AVPixelFormat VAR_4, enum AVPixelFormat VAR_5,

                  int VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10,

                  struct Results *VAR_11)

{

    static enum AVPixelFormat VAR_12;

    static int VAR_13, VAR_14;

    static uint8_t *VAR_15[4];

    static int VAR_16[4];

    uint8_t *dst[4] = { 0 };

    uint8_t *out[4] = { 0 };

    int VAR_17[4];

    int VAR_18;

    uint64_t ssdY, ssdU = 0, ssdV = 0, ssdA = 0;

    struct SwsContext *VAR_19 = NULL, *VAR_20 = NULL;

    uint32_t crc = 0;

    int VAR_21      = 0;



    if (VAR_12 != VAR_4 || VAR_13 != VAR_6 || VAR_14 != VAR_7) {

        struct SwsContext *VAR_22 = NULL;

        int VAR_23;



        for (VAR_23 = 0; VAR_23 < 4; VAR_23++)

            av_freep(&VAR_15[VAR_23]);



        av_image_fill_linesizes(VAR_16, VAR_4, VAR_6);

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

            VAR_16[VAR_23] = FFALIGN(VAR_16[VAR_23], 16);

            if (VAR_16[VAR_23])

                VAR_15[VAR_23] = av_mallocz(VAR_16[VAR_23] * VAR_7 + 16);

            if (VAR_16[VAR_23] && !VAR_15[VAR_23]) {

                perror("Malloc");

                VAR_21 = -1;

                goto end;

            }

        }

        VAR_22 = sws_getContext(VAR_2, VAR_3, AV_PIX_FMT_YUVA420P, VAR_6, VAR_7,

                                    VAR_4, SWS_BILINEAR, NULL, NULL, NULL);

        if (!VAR_22) {

            fprintf(stderr, "Failed to get %s ---> %s\n",

                    av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name,

                    av_pix_fmt_descriptors[VAR_4].name);

            VAR_21 = -1;

            goto end;

        }

        sws_scale(VAR_22, VAR_0, VAR_1, 0, VAR_3, VAR_15, VAR_16);

        sws_freeContext(VAR_22);



        VAR_12 = VAR_4;

        VAR_13      = VAR_6;

        VAR_14      = VAR_7;

    }



    av_image_fill_linesizes(VAR_17, VAR_5, VAR_8);

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

        







        



        VAR_17[VAR_18] = FFALIGN(VAR_17[VAR_18], 16);

        if (VAR_17[VAR_18])

            dst[VAR_18] = av_mallocz(VAR_17[VAR_18] * VAR_9 + 16);

        if (VAR_17[VAR_18] && !dst[VAR_18]) {

            perror("Malloc");

            VAR_21 = -1;



            goto end;

        }

    }



    VAR_19 = sws_getContext(VAR_6, VAR_7, VAR_4, VAR_8, VAR_9, VAR_5,

                                VAR_10, NULL, NULL, NULL);

    if (!VAR_19) {

        fprintf(stderr, "Failed to get %s ---> %s\n",

                av_pix_fmt_descriptors[VAR_4].name,

                av_pix_fmt_descriptors[VAR_5].name);

        VAR_21 = -1;

        goto end;

    }



    printf(" %s %dx%d -> %s %3dx%3d VAR_10=%2d",

           av_pix_fmt_descriptors[VAR_4].name, VAR_6, VAR_7,

           av_pix_fmt_descriptors[VAR_5].name, VAR_8, VAR_9,

           VAR_10);

    fflush(stdout);



    sws_scale(VAR_19, VAR_15, VAR_16, 0, VAR_7, dst, VAR_17);



    for (VAR_18 = 0; VAR_18 < 4 && VAR_17[VAR_18]; VAR_18++)

        crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[VAR_18],

                     VAR_17[VAR_18] * VAR_9);



    if (VAR_11 && crc == VAR_11->crc) {

        ssdY = VAR_11->ssdY;

        ssdU = VAR_11->ssdU;

        ssdV = VAR_11->ssdV;

        ssdA = VAR_11->ssdA;

    } else {

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

            VAR_1[VAR_18] = FFALIGN(VAR_1[VAR_18], 16);

            if (VAR_1[VAR_18])

                out[VAR_18] = av_mallocz(VAR_1[VAR_18] * VAR_3);

            if (VAR_1[VAR_18] && !out[VAR_18]) {

                perror("Malloc");

                VAR_21 = -1;

                goto end;

            }

        }

        VAR_20 = sws_getContext(VAR_8, VAR_9, VAR_5, VAR_2, VAR_3,

                                    AV_PIX_FMT_YUVA420P, SWS_BILINEAR,

                                    NULL, NULL, NULL);

        if (!VAR_20) {

            fprintf(stderr, "Failed to get %s ---> %s\n",

                    av_pix_fmt_descriptors[VAR_5].name,

                    av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name);

            VAR_21 = -1;

            goto end;

        }

        sws_scale(VAR_20, dst, VAR_17, 0, VAR_9, out, VAR_1);



        ssdY = getSSD(VAR_0[0], out[0], VAR_1[0], VAR_1[0], VAR_2, VAR_3);

        if (hasChroma(VAR_4) && hasChroma(VAR_5)) {

            

            ssdU = getSSD(VAR_0[1], out[1], VAR_1[1], VAR_1[1],

                          (VAR_2 + 1) >> 1, (VAR_3 + 1) >> 1);

            ssdV = getSSD(VAR_0[2], out[2], VAR_1[2], VAR_1[2],

                          (VAR_2 + 1) >> 1, (VAR_3 + 1) >> 1);

        }

        if (isALPHA(VAR_4) && isALPHA(VAR_5))

            ssdA = getSSD(VAR_0[3], out[3], VAR_1[3], VAR_1[3], VAR_2, VAR_3);



        ssdY /= VAR_2 * VAR_3;

        ssdU /= VAR_2 * VAR_3 / 4;

        ssdV /= VAR_2 * VAR_3 / 4;

        ssdA /= VAR_2 * VAR_3;



        sws_freeContext(VAR_20);



        for (VAR_18 = 0; VAR_18 < 4; VAR_18++)

            if (VAR_1[VAR_18])

                av_free(out[VAR_18]);

    }



    printf(" CRC=%08x SSD=%5"PRId64 ",%5"PRId64 ",%5"PRId64 ",%5"PRId64 "\n",

           crc, ssdY, ssdU, ssdV, ssdA);



end:

    sws_freeContext(VAR_19);



    for (VAR_18 = 0; VAR_18 < 4; VAR_18++)

        if (VAR_17[VAR_18])

            av_free(dst[VAR_18]);



    return VAR_21;

}

static int FUNC_0(uint8_t *VAR_0[4], int VAR_1[4], int VAR_2, int VAR_3,
enum AVPixelFormat VAR_4, enum AVPixelFormat VAR_5,
int VAR_6, int VAR_7, int VAR_8, int VAR_9, int VAR_10,
struct Results *VAR_11)
{ static enum AVPixelFormat VAR_12; static int VAR_13, VAR_14; static uint8_t *VAR_15[4]; static int VAR_16[4]; uint8_t *dst[4] = { 0 }; uint8_t *out[4] = { 0 }; int VAR_17[4]; int VAR_18; uint64_t ssdY, ssdU = 0, ssdV = 0, ssdA = 0; struct SwsContext *VAR_19 = NULL, *VAR_20 = NULL; uint32_t crc = 0; int VAR_21      = 0; if (VAR_12 != VAR_4 || VAR_13 != VAR_6 || VAR_14 != VAR_7) { struct SwsContext *VAR_22 = NULL; int VAR_23; for (VAR_23 = 0; VAR_23 < 4; VAR_23++) av_freep(&VAR_15[VAR_23]); av_image_fill_linesizes(VAR_16, VAR_4, VAR_6); for (VAR_23 = 0; VAR_23 < 4; VAR_23++) { VAR_16[VAR_23] = FFALIGN(VAR_16[VAR_23], 16); if (VAR_16[VAR_23])
VAR_15[VAR_23] = av_mallocz(VAR_16[VAR_23] * VAR_7 + 16); if (VAR_16[VAR_23] && !VAR_15[VAR_23]) { perror("Malloc"); VAR_21 = -1; goto end; } } VAR_22 = sws_getContext(VAR_2, VAR_3, AV_PIX_FMT_YUVA420P, VAR_6, VAR_7,
VAR_4, SWS_BILINEAR, NULL, NULL, NULL); if (!VAR_22) { fprintf(stderr, "Failed to get %s ---> %s\n",
av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name,
av_pix_fmt_descriptors[VAR_4].name); VAR_21 = -1; goto end; } sws_scale(VAR_22, VAR_0, VAR_1, 0, VAR_3, VAR_15, VAR_16); sws_freeContext(VAR_22); VAR_12 = VAR_4; VAR_13      = VAR_6; VAR_14      = VAR_7; } av_image_fill_linesizes(VAR_17, VAR_5, VAR_8); for (VAR_18 = 0; VAR_18 < 4; VAR_18++) { VAR_17[VAR_18] = FFALIGN(VAR_17[VAR_18], 16); if (VAR_17[VAR_18])
dst[VAR_18] = av_mallocz(VAR_17[VAR_18] * VAR_9 + 16); if (VAR_17[VAR_18] && !dst[VAR_18]) { perror("Malloc"); VAR_21 = -1; goto end; } } VAR_19 = sws_getContext(VAR_6, VAR_7, VAR_4, VAR_8, VAR_9, VAR_5,
VAR_10, NULL, NULL, NULL); if (!VAR_19) { fprintf(stderr, "Failed to get %s ---> %s\n",
av_pix_fmt_descriptors[VAR_4].name,
av_pix_fmt_descriptors[VAR_5].name); VAR_21 = -1; goto end; } printf(" %s %dx%d -> %s %3dx%3d VAR_10=%2d",
av_pix_fmt_descriptors[VAR_4].name, VAR_6, VAR_7,
av_pix_fmt_descriptors[VAR_5].name, VAR_8, VAR_9,
VAR_10); fflush(stdout); sws_scale(VAR_19, VAR_15, VAR_16, 0, VAR_7, dst, VAR_17); for (VAR_18 = 0; VAR_18 < 4 && VAR_17[VAR_18]; VAR_18++) crc = av_crc(av_crc_get_table(AV_CRC_32_IEEE), crc, dst[VAR_18],
VAR_17[VAR_18] * VAR_9); if (VAR_11 && crc == VAR_11->crc) { ssdY = VAR_11->ssdY; ssdU = VAR_11->ssdU; ssdV = VAR_11->ssdV; ssdA = VAR_11->ssdA; } else { for (VAR_18 = 0; VAR_18 < 4; VAR_18++) { VAR_1[VAR_18] = FFALIGN(VAR_1[VAR_18], 16); if (VAR_1[VAR_18])
out[VAR_18] = av_mallocz(VAR_1[VAR_18] * VAR_3); if (VAR_1[VAR_18] && !out[VAR_18]) { perror("Malloc"); VAR_21 = -1; goto end; } } VAR_20 = sws_getContext(VAR_8, VAR_9, VAR_5, VAR_2, VAR_3,
AV_PIX_FMT_YUVA420P, SWS_BILINEAR,
NULL, NULL, NULL); if (!VAR_20) { fprintf(stderr, "Failed to get %s ---> %s\n",
av_pix_fmt_descriptors[VAR_5].name,
av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name); VAR_21 = -1; goto end; } sws_scale(VAR_20, dst, VAR_17, 0, VAR_9, out, VAR_1); ssdY = getSSD(VAR_0[0], out[0], VAR_1[0], VAR_1[0], VAR_2, VAR_3); if (hasChroma(VAR_4) && hasChroma(VAR_5)) { ssdU = getSSD(VAR_0[1], out[1], VAR_1[1], VAR_1[1],
(VAR_2 + 1) >> 1, (VAR_3 + 1) >> 1); ssdV = getSSD(VAR_0[2], out[2], VAR_1[2], VAR_1[2],
(VAR_2 + 1) >> 1, (VAR_3 + 1) >> 1); } if (isALPHA(VAR_4) && isALPHA(VAR_5))
ssdA = getSSD(VAR_0[3], out[3], VAR_1[3], VAR_1[3], VAR_2, VAR_3); ssdY /= VAR_2 * VAR_3; ssdU /= VAR_2 * VAR_3 / 4; ssdV /= VAR_2 * VAR_3 / 4; ssdA /= VAR_2 * VAR_3; sws_freeContext(VAR_20); for (VAR_18 = 0; VAR_18 < 4; VAR_18++) if (VAR_1[VAR_18])
av_free(out[VAR_18]); } printf(" CRC=%08x SSD=%5"PRId64 ",%5"PRId64 ",%5"PRId64 ",%5"PRId64 "\n",
crc, ssdY, ssdU, ssdV, ssdA); end:
sws_freeContext(VAR_19); for (VAR_18 = 0; VAR_18 < 4; VAR_18++) if (VAR_17[VAR_18])
av_free(dst[VAR_18]); return VAR_21; }