HydrogenAudio

Lossy Audio Compression => MP3 => MP3 - Tech => Topic started by: rodca1986 on 2015-05-08 06:19:07

Title: Extraction of MDCT coefficients on MP3 or WAV previously compressed
Post by: rodca1986 on 2015-05-08 06:19:07
Hi,

I'm doing a master's on detection of double compression on MP3 audio files. I need to extract the MDCT (Modified Discrete Cosine Transform) coefficients of MP3 file or WAV previously compressed. The related work that i found utilized the LAME MP3 ( http://sourceforge.net/projects/lame/ (http://sourceforge.net/projects/lame/) ) encoder to do that extraction, but i found it's very difficult to use for that objective. There is a minimal documentation on the file HACKING of the link. It only describes that is possible to compute the MDCT coefficients, but i don't know how to do it.
 
I appreciate any help
Title: Extraction of MDCT coefficients on MP3 or WAV previously compressed
Post by: saratoga on 2015-05-08 15:55:49
If you want to record the MDCT coefficients during encoding, I would just add an fwrite() right after the call to the MDCT and store the transformed buffer directly to disk.
Title: Extraction of MDCT coefficients on MP3 or WAV previously compressed
Post by: rodca1986 on 2015-05-09 03:36:09
If you want to record the MDCT coefficients during encoding, I would just add an fwrite() right after the call to the MDCT and store the transformed buffer directly to disk.


I'm new on understanding the code of MP3. I need to extract the MDCT coefficients before the quantization. Example: I have WAV file previously compressed. On that audio i only want to extract the MDCT coefficients before quantization or huffman encoding. I don't want to compress the audio again. I only need the coefficients of each frame separated.
Title: Extraction of MDCT coefficients on MP3 or WAV previously compressed
Post by: saratoga on 2015-05-09 04:05:11
Example: I have WAV file previously compressed. On that audio i only want to extract the MDCT coefficients before quantization or huffman encoding.


WAV files don't have MDCT coefficients.  Do you mean you have an MP3 file rather than a WAV file?  Or something else? 

I don't want to compress the audio again. I only need the coefficients of each frame separated.


I don't fully understand the question, but I think the answer is to edit an [encoder/decoder] such that it saves the MDCT coefficients right [after/before] the MDCT.