Logo Search packages:      
Sourcecode: ffmpeg-debian version File versions

SwsVector* sws_getConstVec ( double  c,
int  length 

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

Definition at line 2909 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