Logo Search packages:      
Sourcecode: ffmpeg version File versions  Download package

SwsVector* sws_getConstVec ( double  c,
int  length 
)

Allocates and returns a vector with length coefficients, all with the same value c.

Definition at line 2908 of file swscale.c.

References av_malloc().

                                                {
    int i;
    double *coeff= av_malloc(length*sizeof(double));
    SwsVector *vec= av_malloc(sizeof(SwsVector));

    vec->coeff= coeff;
    vec->length= length;

    for (i=0; i<length; i++)
        coeff[i]= c;

    return vec;
}


Generated by  Doxygen 1.6.0   Back to index