[FFmpeg-soc] [soc]: r616 - in eac3: ac3tab.c ac3tab.h eac3_parser.c

bwolowiec subversion at mplayerhq.hu
Tue Aug 7 22:26:09 CEST 2007


Author: bwolowiec
Date: Tue Aug  7 22:26:09 2007
New Revision: 616

Log:
Add support for frame based channel exponent strategy.


Modified:
   eac3/ac3tab.c
   eac3/ac3tab.h
   eac3/eac3_parser.c

Modified: eac3/ac3tab.c
==============================================================================
--- eac3/ac3tab.c	(original)
+++ eac3/ac3tab.c	Tue Aug  7 22:26:09 2007
@@ -25,6 +25,7 @@
  */
 
 #include "ac3tab.h"
+#include "ac3.h"
 
 /**
  * Possible frame sizes.
@@ -1302,3 +1303,39 @@ const int16_t (*ff_vq_hebap[8])[6] = {
     ff_vq_hebap7,
 };
 
+/**
+ * Table E2.14 Frame Exponent Strategy Combinations
+ */
+const uint8_t ff_eac3_frm_expstr[32][6] = {
+{    EXP_D15,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE},
+{    EXP_D15,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE,    EXP_D45},
+{    EXP_D15,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE,    EXP_D25,  EXP_REUSE},
+{    EXP_D15,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE,    EXP_D45,    EXP_D45},
+{    EXP_D25,  EXP_REUSE,  EXP_REUSE,    EXP_D25,  EXP_REUSE,  EXP_REUSE},
+{    EXP_D25,  EXP_REUSE,  EXP_REUSE,    EXP_D25,  EXP_REUSE,    EXP_D45},
+{    EXP_D25,  EXP_REUSE,  EXP_REUSE,    EXP_D45,    EXP_D25,  EXP_REUSE},
+{    EXP_D25,  EXP_REUSE,  EXP_REUSE,    EXP_D45,    EXP_D45,    EXP_D45},
+{    EXP_D25,  EXP_REUSE,    EXP_D15,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE},
+{    EXP_D25,  EXP_REUSE,    EXP_D25,  EXP_REUSE,  EXP_REUSE,    EXP_D45},
+{    EXP_D25,  EXP_REUSE,    EXP_D25,  EXP_REUSE,    EXP_D25,  EXP_REUSE},
+{    EXP_D25,  EXP_REUSE,    EXP_D25,  EXP_REUSE,    EXP_D45,    EXP_D45},
+{    EXP_D25,  EXP_REUSE,    EXP_D45,    EXP_D25,  EXP_REUSE,  EXP_REUSE},
+{    EXP_D25,  EXP_REUSE,    EXP_D45,    EXP_D25,  EXP_REUSE,    EXP_D45},
+{    EXP_D25,  EXP_REUSE,    EXP_D45,    EXP_D45,    EXP_D25,  EXP_REUSE},
+{    EXP_D25,  EXP_REUSE,    EXP_D45,    EXP_D45,    EXP_D45,    EXP_D45},
+{    EXP_D45,    EXP_D15,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE},
+{    EXP_D45,    EXP_D15,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE,    EXP_D45},
+{    EXP_D45,    EXP_D25,  EXP_REUSE,  EXP_REUSE,    EXP_D25,  EXP_REUSE},
+{    EXP_D45,    EXP_D25,  EXP_REUSE,  EXP_REUSE,    EXP_D45,    EXP_D45},
+{    EXP_D45,    EXP_D25,  EXP_REUSE,    EXP_D25,  EXP_REUSE,  EXP_REUSE},
+{    EXP_D45,    EXP_D25,  EXP_REUSE,    EXP_D25,  EXP_REUSE,    EXP_D45},
+{    EXP_D45,    EXP_D25,  EXP_REUSE,    EXP_D45,    EXP_D25,  EXP_REUSE},
+{    EXP_D45,    EXP_D25,  EXP_REUSE,    EXP_D45,    EXP_D45,    EXP_D45},
+{    EXP_D45,    EXP_D45,    EXP_D15,  EXP_REUSE,  EXP_REUSE,  EXP_REUSE},
+{    EXP_D45,    EXP_D45,    EXP_D25,  EXP_REUSE,  EXP_REUSE,    EXP_D45},
+{    EXP_D45,    EXP_D45,    EXP_D25,  EXP_REUSE,    EXP_D25,  EXP_REUSE},
+{    EXP_D45,    EXP_D45,    EXP_D25,  EXP_REUSE,    EXP_D45,    EXP_D45},
+{    EXP_D45,    EXP_D45,    EXP_D45,    EXP_D25,  EXP_REUSE,  EXP_REUSE},
+{    EXP_D45,    EXP_D45,    EXP_D45,    EXP_D25,  EXP_REUSE,    EXP_D45},
+{    EXP_D45,    EXP_D45,    EXP_D45,    EXP_D45,    EXP_D25,  EXP_REUSE},
+};

Modified: eac3/ac3tab.h
==============================================================================
--- eac3/ac3tab.h	(original)
+++ eac3/ac3tab.h	Tue Aug  7 22:26:09 2007
@@ -55,6 +55,7 @@ extern const int16_t ff_vq_hebap5[128][6
 extern const int16_t ff_vq_hebap6[256][6];
 extern const int16_t ff_vq_hebap7[512][6];
 extern const int16_t (*ff_vq_hebap[8])[6];
+const uint8_t ff_eac3_frm_expstr[32][6];
 
 
 #endif /* AC3TAB_H */

Modified: eac3/eac3_parser.c
==============================================================================
--- eac3/eac3_parser.c	(original)
+++ eac3/eac3_parser.c	Tue Aug  7 22:26:09 2007
@@ -319,16 +319,21 @@ int ff_eac3_parse_audfrm(GetBitContext *
     }
     else
     {
+        /* cplexpstr[blk] and chexpstr[blk][ch] derived from table lookups. see Table E2.14 */
         if( (s->acmod > 0x1) && (s->ncplblks > 0) ) {
             GET_BITS(s->frmcplexpstr, gbc, 5);
             s->frmchexpstr[0] = s->frmcplexpstr;
+            for(blk=0; blk<6; blk++){
+                s->chexpstr[0][blk] = ff_eac3_frm_expstr[s->frmchexpstr[0]][blk];
+                s->cplexpstr[blk] = s->chexpstr[0][blk];
+            }
         }
         for(ch = 1; ch <= s->nfchans; ch++) {
             GET_BITS(s->frmchexpstr[ch], gbc, 5);
+            for(blk=0; blk<6; blk++){
+                s->chexpstr[ch][blk] = ff_eac3_frm_expstr[s->frmchexpstr[ch]][blk];
+            }
         }
-        /* cplexpstr[blk] and chexpstr[blk][ch] derived from table lookups ? see Table E2.14 */
-        av_log(s->avctx, AV_LOG_ERROR, "NOT IMPLEMENTED");
-        return -1;
     }
     if(s->lfeon)
     {



More information about the FFmpeg-soc mailing list