[FFmpeg-devel] [PATCH] ALS decoder

Diego Biurrun diego
Tue Aug 25 18:47:22 CEST 2009


On Tue, Aug 25, 2009 at 05:40:31PM +0200, Thilo Borgmann wrote:
> Revision 9 attached.
> 
> --- libavcodec/alsdec.c	(revision 0)
> +++ libavcodec/alsdec.c	(revision 0)
> @@ -0,0 +1,1052 @@
> +    if (!(ctx->quant_cof = av_malloc(sizeof(*ctx->quant_cof) * sconf->max_order)) ||
> +        !(ctx->lpc_cof   = av_malloc(sizeof(*ctx->lpc_cof) * sconf->max_order))) {

align

> +    if (samples != 0xFFFFFFFF) {
> +        ctx->num_frames        = ((samples - 1) / sconf->frame_length) + 1;
> +        ctx->last_frame_length = (samples - 1) % sconf->frame_length + 1;

align

> +        if(!(sconf->chan_pos = av_malloc(avctx->channels * sizeof(*sconf->chan_pos))))

if (

> +        // reconstruct shifted signal
> +        if (*shift_lsbs) {
> +            for (smp = -1; smp >= -sconf->max_order; smp--)
> +                raw_samples[smp] >>= *shift_lsbs;
> +        }

nit: pointless {}

> +    // read block type flag and read the accordingly
> +    if (get_bits1(gb) == 0) {

if (!get_bits1(gb)) {

> +    if (sconf->rlslms) {
> +        // TODO: read RLSLMS extension data
> +    }

Hmmm

> +            // if joint_stereo and block_switching is set, independent decoding
> +            // is signaled via the first bit of bs_info
> +            if(sconf->joint_stereo && sconf->block_switching) {

if (

> +    if (sconf->floating) {
> +        // TODO: read_diff_float_data
> +    }

Hmmm

Diego



More information about the ffmpeg-devel mailing list