[FFmpeg-devel] [PATCH] alac.c cleanup (was ALAC question)

Michael Niedermayer michaelni
Tue Jul 17 22:01:35 CEST 2007


Hi

On Fri, Jul 13, 2007 at 03:36:17AM +0200, Vitor Sessak wrote:
> Hi
> 
> Michael Niedermayer wrote:
> >Hi
> >
> >yes, please split it if possible
> 
> First chunk attached. Changes only the two-channels decoding.
> 
> -Vitor

> Index: libavcodec/alac.c
> ===================================================================
> --- libavcodec/alac.c	(revision 9617)
> +++ libavcodec/alac.c	(working copy)
> @@ -630,133 +630,86 @@
>  
>          if (!isnotcompressed) {
>           /* compressed */
> -            int16_t predictor_coef_table_a[32];
> -            int predictor_coef_num_a;
> -            int prediction_type_a;
> -            int prediction_quantitization_a;
> -            int ricemodifier_a;
> +            int16_t predictor_coef_table[channels][32];
> +            int predictor_coef_num[channels];
> +            int prediction_type[channels];
> +            int prediction_quantitization[channels];
> +            int ricemodifier[channels];
>  
> -            int16_t predictor_coef_table_b[32];
> -            int predictor_coef_num_b;
> -            int prediction_type_b;
> -            int prediction_quantitization_b;
> -            int ricemodifier_b;
> +            int i, chan;
>  
> -            int i;
> -
>              interlacing_shift = get_bits(&alac->gb, 8);
>              interlacing_leftweight = get_bits(&alac->gb, 8);
>  
> -            /******** channel 1 ***********/
> -            prediction_type_a = get_bits(&alac->gb, 4);
> -            prediction_quantitization_a = get_bits(&alac->gb, 4);
> +          for (chan = 0; chan < channels; chan++) {
> +            prediction_type[chan] = get_bits(&alac->gb, 4);
> +            prediction_quantitization[chan] = get_bits(&alac->gb, 4);

on its own this change makes no sense as channels=1 here
could you provide a sample which benefits from this 2->1 change
or have i missed something?

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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070717/95b7d27c/attachment.pgp>



More information about the ffmpeg-devel mailing list