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

Michael Niedermayer michaelni
Tue Jul 17 23:33:10 CEST 2007


Hi

On Tue, Jul 17, 2007 at 10:18:56PM +0200, Vitor Sessak wrote:
> Hi
> 
> Michael Niedermayer wrote:
> > 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?
> > 
> > [...]
> 
> All modified lines are inside a
> 
> switch(channels) {
> case 1:
>     [...]
>     break;
> case 2:
>     { all modified lines }
>     break;
> }

ok, sorry, ive looked at an old checkout by misstake, the patch is ok then

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/eb1fbafc/attachment.pgp>



More information about the ffmpeg-devel mailing list