On Fri, Jun 13, 2014 at 5:00 AM, Niels Möller <[email protected]> wrote:
>
> Signed-off-by: Niels Möller <[email protected]>
> ---
>  libavcodec/dcadata.h | 30 +++++++++++++++++++++++++++++-
>  1 file changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/dcadata.h b/libavcodec/dcadata.h
> index 28c40cf..24ae4ef 100644
> --- a/libavcodec/dcadata.h
> +++ b/libavcodec/dcadata.h
> @@ -7305,7 +7305,22 @@ DECLARE_ALIGNED(16, static const float, 
> fir_32bands_nonperfect)[] =
>  +1.390191784E-007
>  };
>
> -/* pre-scale lfe fir coefficients */
> +/* pre-scale lfe fir coefficients

For multiline comments please add a leading * also for empty lines.

> +
> +   Permuted compared to table D.8 in the spec. First, the table in the

I think it's obvious that a table refers to a spec, you could drop the
first reference to avoid repeating "in the spec" too much maybe.

> +   spec has twice the number of coefficients, but they are reflected,
> +   T[i] = T[511-i]. Furthermore, the indices are permuted, so that
> +
> +     lfe_fir_64[8 * k + j] = T[64*j + k]

please keep spaces in formulae too

> +   for 0 <= k < 32 and 0 <= j < 8. (This corresponds to adding a
> +   leading zero to the 8-bit index, and rotating it right by 3 bits as
> +   a 9-bit field). Values with j >= 4 can be reflected, as
> +
> +     lfe_fir_64[8 * k + j] = T[64*(7-j) + (63-k)]
> +
> +   so all values in T get included. */
> +
>  #define SCALE(c) ((c) / (256.0f * 32768.0f))
>  DECLARE_ALIGNED(16, static const float, lfe_fir_64)[] =
>  {

same below

> @@ -7439,6 +7454,19 @@ DECLARE_ALIGNED(16, static const float, lfe_fir_64)[] =
>      SCALE(3.165979683399200e-2), SCALE(1.527829794213176e-3),
>  };
>
> +/* Permuted compared to table D.8 in the spec. First, the table in the
> +   spec has twice the number of coefficients, but they are reflected,
> +   T[i] = T[511-i]. Furthermore, the indices are permuted, so that
> +
> +     lfe_fir_128[4 * k + j] = T[128*j + k]
> +
> +   for 0 <= k < 64 and 0 <= j < 4. Values with j >= 2 can be
> +   reflected, as
> +
> +     lfe_fir_128[4 * k + j] = T[128*(3-j) + (127-k)]
> +
> +   so all values in T get included. */
> +
>  DECLARE_ALIGNED(16, static const float, lfe_fir_128)[] =
>  {
>      SCALE(0.00053168571), SCALE(0.15878495574), SCALE(0.68603444099), 
> SCALE(0.15492856503),
> --
> 1.8.3.2

Other than that it looks good, thanks for spending time documenting all this.
Cheers,
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to