[FFmpeg-devel] [PATCH] More code shared between AMR and SIPR

Diego Biurrun diego
Thu Nov 19 23:48:11 CET 2009


On Thu, Nov 19, 2009 at 10:25:35PM +0100, Vitor Sessak wrote:
> $subj, one should never underestimate Real's copy-pasting skills.

:)

> The patch to AMR SoC in not very trivial, so I'm attaching it too.

.. some nits ..

> --- libavcodec/acelp_vectors.c	(revision 20451)
> +++ libavcodec/acelp_vectors.c	(working copy)
> @@ -128,6 +128,26 @@
> +        fixed_sparse->x[2*i+1] = pos1;
> +        fixed_sparse->x[2*i  ] = pos2;
> +        fixed_sparse->y[2*i+1] = sign;
> +        fixed_sparse->y[2*i] = pos2 < pos1 ? -sign : sign;

Align.

> @@ -189,3 +209,37 @@
> +
> +void ff_set_fixed_vector(float *out, const AMRFixed *in, float scale, int size)
> +{
> +    int i;
> +
> +    for(i=0; i < in->n; i++) {

K&R please, i.e. space after keywords and around operators

> +void ff_clear_fixed_vector(float *out, const AMRFixed *in, int size)
> +{
> +    int i;
> +
> +    for(i=0; i < in->n; i++) {

ditto

Diego



More information about the ffmpeg-devel mailing list