changeset 5459:4f010d49bee1 libavcodec

use array instead of bitmask
author jbr
date Sat, 04 Aug 2007 11:39:47 +0000
parents ebe106e3339e
children 669395a6bca8
files ac3dec.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ac3dec.c	Sat Aug 04 11:01:11 2007 +0000
+++ b/ac3dec.c	Sat Aug 04 11:39:47 2007 +0000
@@ -100,7 +100,7 @@
     int chincpl[AC3_MAX_CHANNELS];
     int phsflginu;
     int cplcoe;
-    uint32_t cplbndstrc;
+    int cplbndstrc[18];
     int rematstr;
     int nrematbnd;
     int rematflg[AC3_MAX_CHANNELS];
@@ -413,7 +413,7 @@
                 }
                 i++;
             }
-        } while((ctx->cplbndstrc >> subbnd) & 1);
+        } while(ctx->cplbndstrc[subbnd]);
     }
 }
 
@@ -730,7 +730,6 @@
 
     if (get_bits1(gb)) { /* coupling strategy */
         ctx->cplinu = get_bits1(gb);
-        ctx->cplbndstrc = 0;
         if (ctx->cplinu) { /* coupling in use */
             int cplbegf, cplendf;
 
@@ -753,7 +752,7 @@
             ctx->cplendmant = cplendf * 12 + 73;
             for (i = 0; i < ctx->ncplsubnd - 1; i++) /* coupling band structure */
                 if (get_bits1(gb)) {
-                    ctx->cplbndstrc |= 1 << i;
+                    ctx->cplbndstrc[i] = 1;
                     ctx->ncplbnd--;
                 }
         } else {