[FFmpeg-soc] [soc]: r1711 - in eac3: ac3dec.c ac3dec.h eac3dec.c

jbr subversion at mplayerhq.hu
Sun Dec 30 19:59:10 CET 2007


Author: jbr
Date: Sun Dec 30 19:59:09 2007
New Revision: 1711

Log:
change ff_ac3_uncouple_channels() back to taking an AC3DecodeContext as an
argument

Modified:
   eac3/ac3dec.c
   eac3/ac3dec.h
   eac3/eac3dec.c

Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c	(original)
+++ eac3/ac3dec.c	Sun Dec 30 19:59:09 2007
@@ -365,28 +365,23 @@ void ff_ac3_decode_exponents(GetBitConte
  * range using the coupling coefficients and coupling coordinates.
  * reference: Section 7.4.3 Coupling Coordinate Format
  */
-void ff_ac3_uncouple_channels(int fbw_channels, int cpl_start_freq,
-            int num_cpl_bands, int channel_in_cpl[AC3_MAX_CHANNELS],
-            int cpl_band_struct[18],
-            float transform_coeffs[AC3_MAX_CHANNELS][256],
-            float cpl_coords[AC3_MAX_CHANNELS][18])
+void ff_ac3_uncouple_channels(AC3DecodeContext *ctx)
 {
     int i, j, ch, bnd, subbnd;
 
     subbnd = -1;
-    i = cpl_start_freq;
-    for(bnd=0; bnd<num_cpl_bands; bnd++) {
+    i = ctx->start_freq[CPL_CH];
+    for(bnd=0; bnd<ctx->num_cpl_bands; bnd++) {
         do {
             subbnd++;
             for(j=0; j<12; j++) {
-                for(ch=1; ch<=fbw_channels; ch++) {
-                    if(channel_in_cpl[ch])
-                        transform_coeffs[ch][i] = transform_coeffs[CPL_CH][i] *
-                            cpl_coords[ch][bnd] * 8.0f;
+                for(ch=1; ch<=ctx->fbw_channels; ch++) {
+                    if(ctx->channel_in_cpl[ch])
+                        ctx->transform_coeffs[ch][i] = ctx->transform_coeffs[CPL_CH][i] * ctx->cpl_coords[ch][bnd] * 8.0f;
                 }
                 i++;
             }
-        } while(cpl_band_struct[subbnd]);
+        } while(ctx->cpl_band_struct[subbnd]);
     }
 }
 
@@ -522,10 +517,7 @@ static int get_transform_coeffs(AC3Decod
                     av_log(ctx->avctx, AV_LOG_ERROR, "error in decoupling channels\n");
                     return -1;
                 }
-                ff_ac3_uncouple_channels(ctx->fbw_channels,
-                        ctx->start_freq[CPL_CH], ctx->num_cpl_bands,
-                        ctx->channel_in_cpl, ctx->cpl_band_struct,
-                        ctx->transform_coeffs, ctx->cpl_coords);
+                ff_ac3_uncouple_channels(ctx);
                 got_cplchan = 1;
             }
             end = ctx->end_freq[CPL_CH];

Modified: eac3/ac3dec.h
==============================================================================
--- eac3/ac3dec.h	(original)
+++ eac3/ac3dec.h	Sun Dec 30 19:59:09 2007
@@ -246,11 +246,7 @@ typedef struct {
 
 int ff_ac3_get_transform_coeffs_ch(AC3DecodeContext *s, int ch, mant_groups *m);
 
-void ff_ac3_uncouple_channels(int fbw_channels, int cpl_start_freq,
-            int num_cpl_bands, int channel_in_cpl[AC3_MAX_CHANNELS],
-            int cpl_band_struct[18],
-            float transform_coeffs[AC3_MAX_CHANNELS][256],
-            float cpl_coords[AC3_MAX_CHANNELS][18]);
+void ff_ac3_uncouple_channels(AC3DecodeContext *s);
 
 void ff_ac3_remove_dithering(AC3DecodeContext *s);
 

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Sun Dec 30 19:59:09 2007
@@ -1153,9 +1153,7 @@ static int parse_audblk(AC3DecodeContext
     }
 
     if (s->cpl_in_use[blk]) {
-        ff_ac3_uncouple_channels(s->fbw_channels, s->start_freq[CPL_CH],
-                s->num_cpl_bands, s->channel_in_cpl, s->cpl_band_struct,
-                s->transform_coeffs, s->cpl_coords);
+        ff_ac3_uncouple_channels(s);
     }
 
     if(!s->dither_all)



More information about the FFmpeg-soc mailing list