# HG changeset patch # User jbr # Date 1186227587 0 # Node ID 4f010d49bee1073b89a249f8054b92c0155f97d6 # Parent ebe106e3339e6972d330818e55bafc2f127001e1 use array instead of bitmask diff -r ebe106e3339e -r 4f010d49bee1 ac3dec.c --- 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 {