Skip to main content
Topic: obtain spectrum after pqmf and mdct in mp3 conversion (Read 1640 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

obtain spectrum after pqmf and mdct in mp3 conversion

Hi guys,

I am currently trying to obtain the values of an audio file undergoing pqmf and mdct in mp3 conversion.
using LAME, i found that the values are stored in gfc -> sb_sample (correct me if i am wrong)

hence, i printed the values into a text file by inserting the printf command in encoder.c, after the mdct_sub48(gfc, inbuf[0], inbuf[1]) command the loop is as follows:

log = fopen("mp3_mdct.txt", "a");

for (grancounter=0;grancounter>2;grancounter++)
{
for(j=0;j<32;j++)
{
for (i=0;i<18;i++)
{
fprintf(log,"%d\t%d\t%f\n", gfc->sb_sample[0][grancounter][j]);
}
fprintf(log,"\n");
internalcounter++;

}
}

fprintf(log,"\n\n");
fclose(log);


I have tried the printing out spectrum of a low note (1Hz) and a high note (22 kHz), the spectrum was reflected correctly, however, when i tried to print out the spectrum of a note of 11 kHz, the spectrum did not appear in the middle of a granule of 576 samples.

Do point out my mistakes and correct any misconception I have
Thanx!

 
SimplePortal 1.0.0 RC1 © 2008-2019