[FFmpeg-soc] [soc]: r4840 - in als: als_data.h alsdec.c

Diego Biurrun diego at biurrun.de
Thu Jul 30 00:32:06 CEST 2009


On Thu, Jul 30, 2009 at 12:22:36AM +0200, thilo.borgmann wrote:
> 
> Log:
> Added functionality for short-term prediction.
> 
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ als/als_data.h	Thu Jul 30 00:22:36 2009	(r4840)
> @@ -0,0 +1,147 @@
> +
> +/**
> + * @file libavcodec/als_data.h
> + * MPEG-4 ALS header file for common data
> + * @author Thilo Borgmann <thilo.borgmann _at_ googlemail.com>
> + */
> +
> +
> +#ifndef AVCODEC_ALS_DATA_H
> +#define AVCODEC_ALS_DATA_H
> +
> +
> +#include <inttypes.h>

stdint.h should be enough.

> +/** Rice parameters and corresponding index offsets for decoding the
> + *  indices of scaled PARCOR values. The table choosen is set globally
> + *  by the encoder and.

and?

> +
> +#endif

Please add an #endif comment.

> +static void all_parcor_to_lpc(unsigned int num, int64_t *par, int64_t *cof)
> +{
> +    int k;
> +
> +    for (k = 0; k < num; k++) {
> +        parcor_to_lpc(k, par, cof);
> +    }

pointless {}

> @@ -463,17 +555,27 @@ static int read_block_data(ALSDecContext
>              for (smp = 0; smp < progressive; smp++) {
> -                // TODO: prediction
> +                y = 1 << 19;
> +
> +                for (sb = 0; sb < smp; sb++) {
> +                    y += lpc_cof[sb] * raw_samples[smp - (sb + 1)];
> +                }

ditto

Diego


More information about the FFmpeg-soc mailing list