[FFmpeg-soc] [soc]: r3555 - eac3/ac3dec.c

jbr subversion at mplayerhq.hu
Sat Aug 23 06:17:08 CEST 2008


Author: jbr
Date: Sat Aug 23 06:17:07 2008
New Revision: 3555

Log:
simplify decoding of snr offsets

Modified:
   eac3/ac3dec.c

Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c	(original)
+++ eac3/ac3dec.c	Sat Aug 23 06:17:07 2008
@@ -975,7 +975,8 @@ static int decode_audio_block(AC3DecodeC
     }
 
     /* signal-to-noise ratio offsets and fast gains (signal-to-mask ratios) */
-    if (s->snr_offset_strategy && (!s->eac3 || !blk) && get_bits1(gbc)) {
+    if(!s->eac3 || !blk){
+        if(s->snr_offset_strategy && get_bits1(gbc)) {
         int snr = 0;
         int csnr;
         csnr = (get_bits(gbc, 6) - 15) << 4;
@@ -996,6 +997,7 @@ static int decode_audio_block(AC3DecodeC
                 /* run last 2 bit allocation stages if fast gain changes */
                 if(blk && prev != s->fast_gain[ch])
                     bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2);
+                }
             }
         }
     } else if (!s->eac3 && !blk) {



More information about the FFmpeg-soc mailing list