[FFmpeg-devel] [PATCH] ALAC Encoder

Michael Niedermayer michaelni
Mon Aug 18 22:44:05 CEST 2008


On Tue, Aug 19, 2008 at 01:16:50AM +0530, Jai Menon wrote:
> Hi,
> 
> On Tuesday 19 Aug 2008 1:09:07 am Jai Menon wrote:
[...]
> >
> > > [...]
> >
> > New patch attached. Thanks for the review and help with the decorrelation
> > stuff.
> >
> 
> Sorry, wrong patch. Correct one attached.

no problem ...


>@@ -62,7 +62,7 @@
> +    int shift[MAX_LPC_ORDER];
> +    int opt_order;
> +
>-+    opt_order = ff_lpc_calc_coefs(&s->dspctx, s->sample_buf[ch], s->avctx->frame_size, DEFAULT_MIN_PRED_ORDER, DEFAULT_MAX_PRED_ORDER,
>++    opt_order = ff_lpc_calc_coefs(&s->dspctx, s->sample_buf[ch], s->avctx->frame_size, s->min_prediction_order, s->max_prediction_order,
> +                                   ALAC_MAX_LPC_PRECISION, coefs, shift, 1, ORDER_METHOD_EST, ALAC_MAX_LPC_SHIFT, 1);
> +
> +    s->lpc[ch].lpc_order = opt_order;

ok


>@@ -249,6 +249,8 @@
> +        }
> +
> +        s->min_prediction_order = avctx->min_prediction_order;
>++    } else {
>++        s->min_prediction_order = DEFAULT_MIN_PRED_ORDER;
> +    }
> +
> +    if(avctx->max_prediction_order >= 0) {
>@@ -259,6 +261,8 @@
> +        }
> +
> +        s->max_prediction_order = avctx->max_prediction_order;
>++    } else {
>++        s->max_prediction_order = DEFAULT_MAX_PRED_ORDER;
> +    }
> +
> +    if(s->max_prediction_order < s->min_prediction_order) {

i think these 2 inits are slightly cleaner before the if()


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080818/c68f199a/attachment.pgp>



More information about the ffmpeg-devel mailing list