Mode cleanup (removed redundant mdctSize field)
diff --git a/libcelt/modes.c b/libcelt/modes.c
index 27a690b..6e81a2a 100644
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -285,7 +285,7 @@
for (i=0;i<TOTAL_MODES;i++)
{
if (Fs == static_mode_list[i]->Fs &&
- frame_size == static_mode_list[i]->mdctSize)
+ frame_size == static_mode_list[i]->shortMdctSize*static_mode_list[i]->nbShortMdcts)
{
m = static_mode_list[i];
break;
@@ -337,7 +337,6 @@
goto failure;
mode->marker_start = MODEPARTIAL;
mode->Fs = Fs;
- mode->mdctSize = frame_size;
mode->ePredCoef = QCONST16(.8f,15);
if (frame_size >= 640 && (frame_size%16)==0)
@@ -354,7 +353,7 @@
mode->nbShortMdcts = 1;
}
- mode->shortMdctSize = mode->mdctSize/mode->nbShortMdcts;
+ mode->shortMdctSize = frame_size/mode->nbShortMdcts;
res = (mode->Fs+mode->shortMdctSize)/(2*mode->shortMdctSize);
mode->eBands = compute_ebands(Fs, mode->shortMdctSize, res, &mode->nbEBands);