[FFmpeg-devel] [PATCH] lavfi: add curves filter.

Nicolas George nicolas.george at normalesup.org
Tue Mar 5 20:01:42 CET 2013


Le quintidi 15 ventôse, an CCXXI, Clement Boesch a écrit :
> +    double *matrix = av_calloc(3 * n, sizeof(*matrix));
> +    double *h = av_malloc((n - 1) * sizeof(*h));
> +    double *r = av_calloc(n, sizeof(*r));

You could maybe make the code a little more readable by declaring the matrix
as a bidimensional array: matrix[n][3] (since only the first dimension is
variable, it can work).

> +    /* left side of the polynomials into a tridiagonal matrix */
> +    matrix[0] = matrix[n*3 - 1] = 1;

I am not 100% sure yet, but I suspect it should be
matrix[1] = matrix[n * 3 - 2] = 1.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130305/547b99d0/attachment.asc>


More information about the ffmpeg-devel mailing list