ref: f9950e0624beea9d26151a01533808eecacc060b
parent: bce1dd0d7516aa38d511ff96611867600d0fb1bb
author: Jean-Marc Valin <[email protected]>
date: Fri Aug 27 12:15:20 EDT 2010
Remove model markers
--- a/libcelt/dump_modes.c
+++ b/libcelt/dump_modes.c
@@ -197,7 +197,6 @@
/* Print the actual mode data */
fprintf(file, "static const CELTMode mode%d_%d_%d = {\n", mode->Fs, mdctSize, mode->overlap);
- fprintf(file, "0x%x,\t/* marker */\n", 0xa110ca7e);
fprintf(file, INT32 ",\t/* Fs */\n", mode->Fs);
fprintf(file, "%d,\t/* overlap */\n", mode->overlap);
fprintf(file, "%d,\t/* nbEBands */\n", mode->nbEBands);
@@ -223,7 +222,6 @@
fprintf(file, "logN%d_%d,\t/* logN */\n", mode->Fs, mdctSize);
fprintf(file, "{%d, cache_index%d_%d, cache_bits%d_%d},\t/* cache */\n",
mode->cache.size, mode->Fs, mdctSize, mode->Fs, mdctSize);
- fprintf(file, "0x%x,\t/* marker */\n", 0xa110ca7e);
fprintf(file, "};\n");
}
fprintf(file, "\n");
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -46,10 +46,6 @@
#include "static_modes.c"
#endif
-#define MODEVALID 0xa110ca7e
-#define MODEPARTIAL 0x7eca10a1
-#define MODEFREED 0xb10cf8ee
-
#ifndef M_PI
#define M_PI 3.141592653
#endif
@@ -311,7 +307,6 @@
mode = celt_alloc(sizeof(CELTMode));
if (mode==NULL)
goto failure;
- mode->marker_start = MODEPARTIAL;
mode->Fs = Fs;
/* Pre/de-emphasis depends on sampling rate. The "standard" pre-emphasis
@@ -415,8 +410,6 @@
mode->prob = quant_prob_alloc(mode);
if (mode->prob==NULL)
goto failure;
- mode->marker_start = MODEVALID;
- mode->marker_end = MODEVALID;
if (error)
*error = CELT_OK;
@@ -440,18 +433,6 @@
return;
}
- if (mode->marker_start == MODEFREED || mode->marker_end == MODEFREED)
- {
- celt_warning("Freeing a mode which has already been freed");
- return;
- }
-
- if (mode->marker_start != MODEVALID && mode->marker_start != MODEPARTIAL)
- {
- celt_warning("This is not a valid CELT mode structure");
- return;
- }
- mode->marker_start = MODEFREED;
celt_free((celt_int16*)mode->eBands);
celt_free((celt_int16*)mode->allocVectors);
@@ -463,7 +444,6 @@
clt_mdct_clear(&mode->mdct);
quant_prob_free(mode->prob);
- mode->marker_end = MODEFREED;
celt_free((CELTMode *)mode);
#endif
}
--- a/libcelt/modes.h
+++ b/libcelt/modes.h
@@ -77,7 +77,6 @@
@brief Mode definition
*/
struct CELTMode {
- celt_uint32 marker_start;
celt_int32 Fs;
int overlap;
@@ -102,7 +101,6 @@
const celt_int16 *logN;
PulseCache cache;
- celt_uint32 marker_end;
};
/* Prototypes for _ec versions of the encoder/decoder calls (not public) */