changeset 7703:3c531ec92268 libavcodec

copy default coupling band structure from table to decoding context (used for E-AC-3)
author jbr
date Wed, 27 Aug 2008 01:40:46 +0000
parents f91e273722c8
children b928055716e5
files ac3dec.c ac3dec.h
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ac3dec.c	Wed Aug 27 01:36:20 2008 +0000
+++ b/ac3dec.c	Wed Aug 27 01:40:46 2008 +0000
@@ -824,6 +824,9 @@
                     s->cpl_band_struct[bnd] = get_bits1(gbc);
                 }
             } else if (!blk) {
+                memcpy(s->cpl_band_struct,
+                       &ff_eac3_default_cpl_band_struct[cpl_begin_freq+1],
+                       s->num_cpl_subbands-1);
             }
             s->cpl_band_struct[s->num_cpl_subbands-1] = 0;
 
--- a/ac3dec.h	Wed Aug 27 01:36:20 2008 +0000
+++ b/ac3dec.h	Wed Aug 27 01:40:46 2008 +0000
@@ -82,7 +82,7 @@
     int phase_flags[18];                    ///< phase flags                            (phsflg)
     int num_cpl_subbands;                   ///< number of coupling sub bands           (ncplsubnd)
     int num_cpl_bands;                      ///< number of coupling bands               (ncplbnd)
-    int cpl_band_struct[18];                ///< coupling band structure                (cplbndstrc)
+    uint8_t cpl_band_struct[18];            ///< coupling band structure                (cplbndstrc)
     int firstchincpl;                       ///< first channel in coupling
     int first_cpl_coords[AC3_MAX_CHANNELS]; ///< first coupling coordinates states      (firstcplcos)
     int cpl_coords[AC3_MAX_CHANNELS][18];   ///< coupling coordinates                   (cplco)