SwsVector *sws_getGaussianVec(double variance, double quality)

{

    const int length = (int)(variance * quality + 0.5) | 1;

    int i;

    double middle  = (length - 1) * 0.5;

    SwsVector *vec = sws_allocVec(length);



    if (!vec)

        return NULL;



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

        double dist = i - middle;

        vec->coeff[i] = exp(-dist * dist / (2 * variance * variance)) /

                        sqrt(2 * variance * M_PI);

    }



    sws_normalizeVec(vec, 1.0);



    return vec;

}

SwsVector *sws_getGaussianVec(double variance, double quality)

{

    const int length = (int)(variance * quality + 0.5) | 1;

    int i;

    double middle  = (length - 1) * 0.5;

    SwsVector *vec = sws_allocVec(length);



    if (!vec)

        return NULL;



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

        double dist = i - middle;

        vec->coeff[i] = exp(-dist * dist / (2 * variance * variance)) /

                        sqrt(2 * variance * M_PI);

    }



    sws_normalizeVec(vec, 1.0);



    return vec;

}

SwsVector *FUNC_0(double variance, double quality)

{

    const int VAR_0 = (int)(variance * quality + 0.5) | 1;

    int VAR_1;

    double VAR_2  = (VAR_0 - 1) * 0.5;

    SwsVector *vec = sws_allocVec(VAR_0);



    if (!vec)

        return NULL;



    for (VAR_1 = 0; VAR_1 < VAR_0; VAR_1++) {

        double VAR_3 = VAR_1 - VAR_2;

        vec->coeff[VAR_1] = exp(-VAR_3 * VAR_3 / (2 * variance * variance)) /

                        sqrt(2 * variance * M_PI);

    }



    sws_normalizeVec(vec, 1.0);



    return vec;

}

SwsVector *FUNC_0(double variance, double quality)
{ const int VAR_0 = (int)(variance * quality + 0.5) | 1; int VAR_1; double VAR_2  = (VAR_0 - 1) * 0.5; SwsVector *vec = sws_allocVec(VAR_0); if (!vec)
return NULL; for (VAR_1 = 0; VAR_1 < VAR_0; VAR_1++) { double VAR_3 = VAR_1 - VAR_2; vec->coeff[VAR_1] = exp(-VAR_3 * VAR_3 / (2 * variance * variance)) /
sqrt(2 * variance * M_PI); } sws_normalizeVec(vec, 1.0); return vec; }