diff --git a/libcelt/celt.h b/libcelt/celt.h index de7826192c53f072d48c4c261031f80a025563e7..2418f407d26caa82e1da862c7ba37f51e139aebd 100644 --- a/libcelt/celt.h +++ b/libcelt/celt.h @@ -39,6 +39,7 @@ typedef struct CELTMode CELTMode; extern const CELTMode const *celt_mode1; extern const CELTMode const *celt_mode2; +extern const CELTMode const *celt_mode3; /* Encoder stuff */ diff --git a/libcelt/modes.c b/libcelt/modes.c index 3c0fb5c9a0c79d1473185920b650cd4d27cbe1b3..2670d08f280f8d17e3fae438e7fdcc4ce3ab16f5 100644 --- a/libcelt/modes.c +++ b/libcelt/modes.c @@ -42,6 +42,10 @@ const int qpulses2[NBANDS128] = {28,24,20,16,24,20, 18, 12, 10, 10,-7, -4, 0, const int pbank1[PBANDS128+2] = {0, 4, 8, 12, 20, PITCH_END128, 128}; +const int qbank3[NBANDS128+2] = {0, 4, 8, 12, 16, 24, 32, 40, 48, 56, 72, 88, 104, 126, 168, 232, 256}; +#define PITCH_END256 72 +const int pbank3[PBANDS128+2] = {0, 8, 16, 24, 40, PITCH_END256, 256}; + /* Approx 38 kbps @ 44.1 kHz */ const CELTMode mode1 = { 256, /**< frameSize */ @@ -72,5 +76,21 @@ const CELTMode mode2 = { qpulses2 /**< nbPulses */ }; +/* Approx 38 kbps @ 44.1 kHz */ +const CELTMode mode3 = { + 512, /**< frameSize */ + 256, /**< mdctSize */ + 2, /**< nbMdctBlocks */ + + NBANDS128, /**< nbEBands */ + PBANDS128, /**< nbPBands */ + PITCH_END256,/**< pitchEnd */ + + qbank3, /**< eBands */ + pbank3, /**< pBands*/ + qpulses2 /**< nbPulses */ +}; + const CELTMode const *celt_mode1 = &mode1; const CELTMode const *celt_mode2 = &mode2; +const CELTMode const *celt_mode3 = &mode3;