changeset 6959:3ba980378d90 libavcodec

simplify
author jbr
date Sat, 31 May 2008 22:12:01 +0000
parents 1c523b5212cd
children cdde357b67d8
files ac3dec.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ac3dec.c	Sat May 31 21:57:45 2008 +0000
+++ b/ac3dec.c	Sat May 31 22:12:01 2008 +0000
@@ -903,10 +903,7 @@
     s->exp_strategy[CPL_CH] = EXP_REUSE;
     s->exp_strategy[s->lfe_ch] = EXP_REUSE;
     for (ch = !s->cpl_in_use; ch <= s->channels; ch++) {
-        if(ch == s->lfe_ch)
-            s->exp_strategy[ch] = get_bits(gbc, 1);
-        else
-            s->exp_strategy[ch] = get_bits(gbc, 2);
+        s->exp_strategy[ch] = get_bits(gbc, 2 - (ch == s->lfe_ch));
         if(s->exp_strategy[ch] != EXP_REUSE)
             bit_alloc_stages[ch] = 3;
     }