1
0
Fork 0
forked from len0rd/rockbox

Removed non-active seek mechanism from musepack library, small other cleanups.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17446 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2008-05-10 20:33:28 +00:00
parent 66010b9f30
commit 14d45c9d17
6 changed files with 125 additions and 203 deletions

View file

@ -110,11 +110,7 @@ typedef struct mpc_decoder_t {
mpc_bool_t MS_Flag[32]; // MS used? mpc_bool_t MS_Flag[32]; // MS used?
mpc_uint32_t* SeekTable; mpc_uint32_t* SeekTable;
mpc_bool_t Use_SeekTable;
mpc_bool_t Use_FastSeek;
mpc_bool_t Use_StaticSeekTable;
mpc_uint8_t SeekTable_Step; mpc_uint8_t SeekTable_Step;
mpc_uint32_t Max_SeekTable_Size;
#ifdef MPC_FIXED_POINT #ifdef MPC_FIXED_POINT
unsigned char SCF_shift[256]; unsigned char SCF_shift[256];

View file

@ -468,7 +468,7 @@ mpc_decoder_decode_internal(mpc_decoder *d, MPC_SAMPLE_FORMAT *buffer)
return (mpc_uint32_t)(-1); // end of file -> abort decoding return (mpc_uint32_t)(-1); // end of file -> abort decoding
} }
if (d->DecodedFrames == 0 && d->Use_SeekTable) if (d->DecodedFrames == 0)
d->SeekTable[0] = mpc_decoder_bits_read(d); d->SeekTable[0] = mpc_decoder_bits_read(d);
// read jump-info for validity check of frame // read jump-info for validity check of frame
@ -497,7 +497,7 @@ mpc_decoder_decode_internal(mpc_decoder *d, MPC_SAMPLE_FORMAT *buffer)
d->DecodedFrames++; d->DecodedFrames++;
if (d->Use_SeekTable) { /* update seek table */
if (d->SeekTable_Step == 1) { if (d->SeekTable_Step == 1) {
d->SeekTable [d->DecodedFrames] = d->FwdJumpInfo + 20; d->SeekTable [d->DecodedFrames] = d->FwdJumpInfo + 20;
} else { } else {
@ -508,14 +508,10 @@ mpc_decoder_decode_internal(mpc_decoder *d, MPC_SAMPLE_FORMAT *buffer)
} }
d->SeekTableCounter += d->FwdJumpInfo + 20; d->SeekTableCounter += d->FwdJumpInfo + 20;
} }
}
// synthesize signal // synthesize signal
mpc_decoder_requantisierung(d, d->Max_Band); mpc_decoder_requantisierung(d, d->Max_Band);
//if ( d->EQ_activated && PluginSettings.EQbyMPC )
// perform_EQ ();
mpc_decoder_synthese_filter_float(d, buffer); mpc_decoder_synthese_filter_float(d, buffer);
// cut off first MPC_DECODER_SYNTH_DELAY zero-samples // cut off first MPC_DECODER_SYNTH_DELAY zero-samples
@ -570,8 +566,6 @@ mpc_uint32_t mpc_decoder_decode(
{ {
for(;;) for(;;)
{ {
//const mpc_int32_t MaxBrokenFrames = 0; // PluginSettings.MaxBrokenFrames
mpc_uint32_t RING = d->Zaehler; mpc_uint32_t RING = d->Zaehler;
mpc_int32_t vbr_ring = (RING << 5) + d->pos; mpc_int32_t vbr_ring = (RING << 5) + d->pos;
@ -764,7 +758,7 @@ mpc_decoder_requantisierung(mpc_decoder *d, const mpc_int32_t Last_Band)
} }
#ifdef MPC_SUPPORT_SV456 #ifdef MPC_SUPPORT_SV456
static const unsigned char Q_res[32][16] = { static const unsigned char Q_res[32][16] ICONST_ATTR = {
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17}, {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17},
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17}, {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17},
{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17}, {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17},
@ -974,8 +968,6 @@ mpc_decoder_read_bitstream_sv6(mpc_decoder *d)
break; break;
} }
} }
// update Reference for DSCF
//d->DSCF_Reference_R[n] = R[2];
} }
} }
@ -1010,13 +1002,6 @@ mpc_decoder_read_bitstream_sv6(mpc_decoder *d)
void void
mpc_decoder_read_bitstream_sv7(mpc_decoder *d, mpc_bool_t fastSeeking) mpc_decoder_read_bitstream_sv7(mpc_decoder *d, mpc_bool_t fastSeeking)
{ {
// these arrays hold decoding results for bundled quantizers (3- and 5-step)
/*static*/ mpc_int32_t idx30[] = { -1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1};
/*static*/ mpc_int32_t idx31[] = { -1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1, 0, 0, 0, 1, 1, 1};
/*static*/ mpc_int32_t idx32[] = { -1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1};
/*static*/ mpc_int32_t idx50[] = { -2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2};
/*static*/ mpc_int32_t idx51[] = { -2,-2,-2,-2,-2,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2};
mpc_int32_t n,k; mpc_int32_t n,k;
mpc_int32_t Max_used_Band=0; mpc_int32_t Max_used_Band=0;
const HuffmanTyp *Table; const HuffmanTyp *Table;
@ -1451,19 +1436,11 @@ void mpc_decoder_setup(mpc_decoder *d, mpc_reader *r)
d->WordsRead = 0; d->WordsRead = 0;
d->Max_Band = 0; d->Max_Band = 0;
d->SeekTable = NULL; d->SeekTable = NULL;
d->Use_FastSeek = TRUE;
d->Use_SeekTable = TRUE;
d->Use_StaticSeekTable = FALSE;
d->SeekTable_Step = 1; d->SeekTable_Step = 1;
d->SeekTableIndex = 0; d->SeekTableIndex = 0;
d->SeekTableCounter = 0; d->SeekTableCounter = 0;
d->Max_SeekTable_Size = 0;
mpc_decoder_initialisiere_quantisierungstabellen(d, 1.0f); mpc_decoder_initialisiere_quantisierungstabellen(d, 1.0f);
#if 0
mpc_decoder_init_huffman_sv6(d);
mpc_decoder_init_huffman_sv7(d);
#endif
LOOKUP ( mpc_table_HuffQ[0][1], 27, LUT1_0 ); LOOKUP ( mpc_table_HuffQ[0][1], 27, LUT1_0 );
LOOKUP ( mpc_table_HuffQ[1][1], 27, LUT1_1 ); LOOKUP ( mpc_table_HuffQ[1][1], 27, LUT1_1 );
@ -1490,16 +1467,15 @@ void mpc_decoder_setup(mpc_decoder *d, mpc_reader *r)
#endif #endif
} }
void mpc_decoder_destroy(mpc_decoder *d) { void mpc_decoder_destroy(mpc_decoder *d)
{
if (d->SeekTable != NULL && d->Use_StaticSeekTable == FALSE) if (d->SeekTable != NULL)
free(d->SeekTable); free(d->SeekTable);
} }
void mpc_decoder_set_streaminfo(mpc_decoder *d, mpc_streaminfo *si) static void mpc_decoder_set_streaminfo(mpc_decoder *d, mpc_streaminfo *si)
{ {
mpc_uint16_t seekTableSize; mpc_uint32_t seekTableSize;
mpc_decoder_reset_synthesis(d); mpc_decoder_reset_synthesis(d);
mpc_decoder_reset_globals(d); mpc_decoder_reset_globals(d);
@ -1514,28 +1490,14 @@ void mpc_decoder_set_streaminfo(mpc_decoder *d, mpc_streaminfo *si)
d->samples_to_skip = MPC_DECODER_SYNTH_DELAY; d->samples_to_skip = MPC_DECODER_SYNTH_DELAY;
if (d->SeekTable != NULL && d->Use_StaticSeekTable == FALSE) if (d->SeekTable != NULL)
free(d->SeekTable); free(d->SeekTable);
if (d->Use_SeekTable) {
if (d->Use_StaticSeekTable == FALSE) {
if (d->Max_SeekTable_Size == 0) {
seekTableSize = si->frames; seekTableSize = si->frames;
} else {
seekTableSize = min(si->frames, d->Max_SeekTable_Size / sizeof(mpc_uint32_t));
}
d->SeekTable = (mpc_uint32_t*) calloc( sizeof(mpc_uint32_t), seekTableSize); d->SeekTable = (mpc_uint32_t*) calloc( sizeof(mpc_uint32_t), seekTableSize);
d->SeekTable_Step = si->frames / seekTableSize; d->SeekTable_Step = si->frames / seekTableSize;
if (si->frames % seekTableSize) if (si->frames % seekTableSize)
d->SeekTable_Step+=1; d->SeekTable_Step+=1;
} else {
seekTableSize = d->Max_SeekTable_Size / sizeof(mpc_uint32_t);
d->SeekTable_Step = si->frames / seekTableSize;
if (si->frames % seekTableSize)
d->SeekTable_Step+=1;
}
}
} }
mpc_bool_t mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si) mpc_bool_t mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si)
@ -1563,43 +1525,6 @@ mpc_bool_t mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si)
return TRUE; return TRUE;
} }
//---------------------------------------------------------------
// will seek from the beginning of the file to the desired
// position in ms (given by seek_needed)
//---------------------------------------------------------------
#if 0
static void
helper1(mpc_decoder *d, mpc_uint32_t bitpos)
{
f_seek(d, (bitpos >> 5) * 4 + d->MPCHeaderPos);
f_read_dword(d, d->Speicher, 2);
d->dword = SWAP(d->Speicher[d->Zaehler = 0]);
d->pos = bitpos & 31;
}
static void
helper2(mpc_decoder *d, mpc_uint32_t bitpos)
{
f_seek(d, (bitpos>>5) * 4 + d->MPCHeaderPos);
f_read_dword(d, d->Speicher, MEMSIZE);
d->dword = SWAP(d->Speicher[d->Zaehler = 0]);
d->pos = bitpos & 31;
}
static void
helper3(mpc_decoder *d, mpc_uint32_t bitpos, mpc_uint32_t* buffoffs)
{
d->pos = bitpos & 31;
bitpos >>= 5;
if ((mpc_uint32_t)(bitpos - *buffoffs) >= MEMSIZE - 2) {
*buffoffs = bitpos;
f_seek(d, bitpos * 4L + d->MPCHeaderPos);
f_read_dword(d, d->Speicher, MEMSIZE );
}
d->dword = SWAP(d->Speicher[d->Zaehler = bitpos - *buffoffs ]);
}
#endif
// jumps over the current frame // jumps over the current frame
mpc_uint32_t mpc_decoder_jump_frame(mpc_decoder *d) { mpc_uint32_t mpc_decoder_jump_frame(mpc_decoder *d) {
@ -1622,7 +1547,9 @@ static mpc_uint32_t get_initial_fpos(mpc_decoder *d, mpc_uint32_t StreamVersion)
{ {
mpc_uint32_t fpos = 0; mpc_uint32_t fpos = 0;
(void) StreamVersion; (void) StreamVersion;
switch ( d->StreamVersion ) { // setting position to the beginning of the data-bitstream
// setting position to the beginning of the data-bitstream
switch ( d->StreamVersion ) {
case 0x04: fpos = 48; break; case 0x04: fpos = 48; break;
case 0x05: case 0x05:
case 0x06: fpos = 64; break; case 0x06: fpos = 64; break;
@ -1685,7 +1612,7 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
if (seekFrame > 33) if (seekFrame > 33)
lastFrame = seekFrame - 33 + 1 - d->SeekTable_Step; lastFrame = seekFrame - 33 + 1 - d->SeekTable_Step;
if ((!d->Use_SeekTable && delta < 0) || d->MaxDecodedFrames == 0) { if (d->MaxDecodedFrames == 0) {
mpc_decoder_reset_state(d); mpc_decoder_reset_state(d);
@ -1698,7 +1625,6 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
// reset number of decoded frames // reset number of decoded frames
d->DecodedFrames = 0; d->DecodedFrames = 0;
if (d->Use_SeekTable) {
// jump to the last frame, updating seek table // jump to the last frame, updating seek table
if (d->SeekTable_Step == 1) { if (d->SeekTable_Step == 1) {
d->SeekTable[0] = (mpc_uint32_t)fpos; d->SeekTable[0] = (mpc_uint32_t)fpos;
@ -1716,11 +1642,7 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
d->SeekTableCounter += mpc_decoder_jump_frame(d); d->SeekTableCounter += mpc_decoder_jump_frame(d);
} }
} }
} else {
// just jump to the last frame
for (;d->DecodedFrames < lastFrame; d->DecodedFrames++)
mpc_decoder_jump_frame(d);
}
} else if (delta < 0) { } else if (delta < 0) {
@ -1745,8 +1667,6 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
mpc_decoder_reset_state(d); mpc_decoder_reset_state(d);
// jumps forward from the current position // jumps forward from the current position
if (d->Use_SeekTable) {
if (d->MaxDecodedFrames > lastFrame) { // REVIEW: Correct?? or (d->MaxDecodedFrames > d->DecodedFrames) if (d->MaxDecodedFrames > lastFrame) { // REVIEW: Correct?? or (d->MaxDecodedFrames > d->DecodedFrames)
// jump to the last usable position in the seek table // jump to the last usable position in the seek table
if (d->SeekTable_Step == 1) { if (d->SeekTable_Step == 1) {
@ -1779,11 +1699,6 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
d->SeekTableCounter += mpc_decoder_jump_frame(d); d->SeekTableCounter += mpc_decoder_jump_frame(d);
} }
} }
} else {
for (;d->DecodedFrames < lastFrame; d->DecodedFrames++)
mpc_decoder_jump_frame(d);
}
} }
// REVIEW: Needed? // REVIEW: Needed?
@ -1798,7 +1713,7 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
FrameBitCnt = mpc_decoder_bits_read(d); FrameBitCnt = mpc_decoder_bits_read(d);
// scanning the scalefactors (and check for validity of frame) // scanning the scalefactors (and check for validity of frame)
if (d->StreamVersion >= 7) { if (d->StreamVersion >= 7) {
mpc_decoder_read_bitstream_sv7(d, d->Use_FastSeek && (d->DecodedFrames < seekFrame - 1)); mpc_decoder_read_bitstream_sv7(d, (d->DecodedFrames < seekFrame - 1));
} }
else { else {
#ifdef MPC_SUPPORT_SV456 #ifdef MPC_SUPPORT_SV456
@ -1810,14 +1725,13 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
FrameBitCnt = mpc_decoder_bits_read(d) - FrameBitCnt; FrameBitCnt = mpc_decoder_bits_read(d) - FrameBitCnt;
if (d->Use_FastSeek && d->FwdJumpInfo > FrameBitCnt) if (d->FwdJumpInfo > FrameBitCnt)
mpc_decoder_seek_forward(d, d->FwdJumpInfo - FrameBitCnt); mpc_decoder_seek_forward(d, d->FwdJumpInfo - FrameBitCnt);
else if (FrameBitCnt != d->FwdJumpInfo ) else if (FrameBitCnt != d->FwdJumpInfo )
// Bug in perform_jump; // Bug in perform_jump;
return FALSE; return FALSE;
// REVIEW: Only if decodedFrames < maxDecodedFrames?? // REVIEW: Only if decodedFrames < maxDecodedFrames??
if (d->Use_SeekTable) {
if (d->SeekTable_Step == 1) { if (d->SeekTable_Step == 1) {
// check that the frame length corresponds with any data already in the seek table // check that the frame length corresponds with any data already in the seek table
if (d->SeekTable[d->DecodedFrames+1] != 0 && d->SeekTable[d->DecodedFrames+1] != d->FwdJumpInfo + 20) if (d->SeekTable[d->DecodedFrames+1] != 0 && d->SeekTable[d->DecodedFrames+1] != d->FwdJumpInfo + 20)
@ -1833,7 +1747,6 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample)
} }
d->SeekTableCounter += d->FwdJumpInfo + 20; d->SeekTableCounter += d->FwdJumpInfo + 20;
} }
}
// update buffer // update buffer
mpc_decoder_update_buffer(d); mpc_decoder_update_buffer(d);
@ -1906,7 +1819,6 @@ void mpc_decoder_seek_to(mpc_decoder *d, mpc_uint32_t bitPos) {
} }
void mpc_decoder_seek_forward(mpc_decoder *d, mpc_uint32_t bits) { void mpc_decoder_seek_forward(mpc_decoder *d, mpc_uint32_t bits) {
bits += d->pos; bits += d->pos;
@ -1919,11 +1831,3 @@ void mpc_decoder_seek_forward(mpc_decoder *d, mpc_uint32_t bits) {
} }
void mpc_decoder_set_seek_table(mpc_decoder *d, mpc_uint32_t *seek_table, mpc_uint32_t max_table_size) {
d->Use_StaticSeekTable = TRUE;
d->SeekTable = seek_table;
d->Max_SeekTable_Size = max_table_size;
}

View file

@ -103,8 +103,6 @@ void mpc_decoder_setup(mpc_decoder *d, mpc_reader *r);
/// \return TRUE if decoder was initalized successfully, FALSE otherwise /// \return TRUE if decoder was initalized successfully, FALSE otherwise
mpc_bool_t mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si); mpc_bool_t mpc_decoder_initialize(mpc_decoder *d, mpc_streaminfo *si);
void mpc_decoder_set_streaminfo(mpc_decoder *d, mpc_streaminfo *si);
/// Sets decoder sample scaling factor. All decoded samples will be multiplied /// Sets decoder sample scaling factor. All decoded samples will be multiplied
/// by this factor. /// by this factor.
/// \param scale_factor multiplicative scaling factor /// \param scale_factor multiplicative scaling factor
@ -136,10 +134,7 @@ mpc_bool_t mpc_decoder_seek_sample(mpc_decoder *d, mpc_int64_t destsample);
/// Seeks to specified position in seconds in the source stream. /// Seeks to specified position in seconds in the source stream.
mpc_bool_t mpc_decoder_seek_seconds(mpc_decoder *d, double seconds); mpc_bool_t mpc_decoder_seek_seconds(mpc_decoder *d, double seconds);
/// Sets the static seek table pointer. /// Cleans up the decoder (seektable)
void mpc_decoder_set_seek_table(mpc_decoder *d, mpc_uint32_t *seek_table, mpc_uint32_t max_table_size);
/// Cleans up the decoder
void mpc_decoder_destroy(mpc_decoder *d); void mpc_decoder_destroy(mpc_decoder *d);
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -69,6 +69,33 @@ const mpc_int32_t __Dc [1 + 18] ICONST_ATTR = {
127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767
}; };
// decoding results (requantized) for bundled quantizers (3- and 5-step)
// 1st value of bundled 3-step quantizer
const mpc_int32_t idx30[27] ICONST_ATTR = { -1, 0, 1,-1, 0, 1,-1, 0, 1,
-1, 0, 1,-1, 0, 1,-1, 0, 1,
-1, 0, 1,-1, 0, 1,-1, 0, 1};
// 2nd value of bundled 3-step quantizer
const mpc_int32_t idx31[27] ICONST_ATTR = { -1,-1,-1, 0, 0, 0, 1, 1, 1,
-1,-1,-1, 0, 0, 0, 1, 1, 1,
-1,-1,-1, 0, 0, 0, 1, 1, 1};
// 3rd value of bundled 3-step quantizer
const mpc_int32_t idx32[27] ICONST_ATTR = { -1,-1,-1,-1,-1,-1,-1,-1,-1,
0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1};
// 1st value of bundled 5-step quantizer
const mpc_int32_t idx50[25] ICONST_ATTR = { -2,-1, 0, 1, 2,
-2,-1, 0, 1, 2,
-2,-1, 0, 1, 2,
-2,-1, 0, 1, 2,
-2,-1, 0, 1, 2};
// 2nd value of bundled 5-step quantizer
const mpc_int32_t idx51[25] ICONST_ATTR = { -2,-2,-2,-2,-2,
-1,-1,-1,-1,-1,
0, 0, 0, 0, 0,
1, 1, 1, 1, 1,
2, 2, 2, 2, 2};
#ifdef MPC_FIXED_POINT #ifdef MPC_FIXED_POINT
static mpc_uint32_t find_shift(double fval) static mpc_uint32_t find_shift(double fval)
{ {

View file

@ -41,9 +41,15 @@
#include "musepack.h" #include "musepack.h"
/* C O N S T A N T S */ /* C O N S T A N T S */
extern const mpc_uint32_t Res_bit [18]; // bits per sample for chosen quantizer extern const mpc_uint32_t Res_bit[18]; // bits per sample for chosen quantizer
extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; // coefficients for requantization extern const MPC_SAMPLE_FORMAT __Cc[1 + 18]; // coefficients for requantization
extern const mpc_int32_t __Dc [1 + 18]; // offset for requantization extern const mpc_int32_t __Dc[1 + 18]; // offset for requantization
extern const mpc_int32_t idx30[27]; // 1st value of bundled 3-step quantizer
extern const mpc_int32_t idx31[27]; // 2nd value of bundled 3-step quantizer
extern const mpc_int32_t idx32[27]; // 3rd value of bundled 3-step quantizer
extern const mpc_int32_t idx50[25]; // 1st value of bundled 5-step quantizer
extern const mpc_int32_t idx51[25]; // 2nd value of bundled 5-step quantizer
#define Cc (__Cc + 1) #define Cc (__Cc + 1)
#define Dc (__Dc + 1) #define Dc (__Dc + 1)

View file

@ -65,7 +65,6 @@ mpc_bool_t canseek_impl(void *data)
MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH] MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH]
IBSS_ATTR_MPC_SAMPLE_BUF; IBSS_ATTR_MPC_SAMPLE_BUF;
mpc_uint32_t seek_table[10000];
/* this is the codec entry point */ /* this is the codec entry point */
enum codec_status codec_main(void) enum codec_status codec_main(void)
@ -87,11 +86,6 @@ enum codec_status codec_main(void)
reader.canseek = canseek_impl; reader.canseek = canseek_impl;
reader.data = ci; reader.data = ci;
/* Ensure that SeekTable is clear since decoder is reused */
decoder.SeekTable = NULL;
mpc_decoder_set_seek_table(&decoder, seek_table, sizeof(seek_table));
next_track: next_track:
if (codec_init()) { if (codec_init()) {
retval = CODEC_ERROR; retval = CODEC_ERROR;