[FFmpeg-soc] [soc]: r3031 - eac3/eac3dec.c

jbr subversion at mplayerhq.hu
Tue Aug 5 05:20:05 CEST 2008


Author: jbr
Date: Tue Aug  5 05:20:05 2008
New Revision: 3031

Log:
factor out 1 line from an if/else

Modified:
   eac3/eac3dec.c

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Tue Aug  5 05:20:05 2008
@@ -49,9 +49,9 @@ void ff_eac3_get_transform_coeffs_aht_ch
 
     /* if GAQ gain is used, decode gain codes for bins with hebap between
        8 and end_bap */
+    gs = 0;
     if (gaq_mode == EAC3_GAQ_12 || gaq_mode == EAC3_GAQ_14) {
         /* read 1-bit GAQ gain codes */
-        gs = 0;
         for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
             if (s->bap[ch][bin] > 7 && s->bap[ch][bin] < end_bap)
                 gaq_gain[gs++] = get_bits1(gbc) << (gaq_mode-1);
@@ -59,7 +59,6 @@ void ff_eac3_get_transform_coeffs_aht_ch
     } else if (gaq_mode == EAC3_GAQ_124) {
         /* read 1.67-bit GAQ gain codes (3 codes in 5 bits) */
         int gc = 2;
-        gs = 0;
         for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
             if (s->bap[ch][bin] > 7 && s->bap[ch][bin] < end_bap) {
                 if (gc++ == 2) {



More information about the FFmpeg-soc mailing list