4 ms·
Oh! Is that an artifact of Joint Stereo encoding ?
by tecleandor 2y ago
Oh! Is that an artifact of Joint Stereo encoding ?
- gwbas1c 2y ago> Oh! Is that an artifact of Joint Stereo encoding ? I personally don't understand enough of MP3's internals to explain that. What I assume is that, because MP3 internally stores Fourier transforms in the frequency domain, instead of the time domain, it uses very few bits to store phase. This will result in phase shifts. Hopefully, someone else can give a better explanation of this than I can. Basically, think of it this way: 1: Imagine a frame of 64 16-bit samples. (1024 bits) 2: Than its converted to 32-bit floats: 64 32-bit samples. 3: Than its transformed 4: Now there are: 1 DC bias 32-bit float, where phase is 0, and 32 frequency amplitude floats, and 32 phase floats. (The other 31 frequency/phase pairs are duplicates and don't need to be stored.) These floats need to be quantized so that there are many less bits. Some of it can happen by using very few bits to store phase, and some of it can happen by using less bits to store amplitudes. Again, someone else can probably explain this better than I can.
- tecleandor 2y agoInteresting. In a quick internet search seems like people finds a small phase shift on MP3 enconding, but I haven't found details on why. Haven't had much time to find it, though...
- gwbas1c 2y agoSpeculation on my part: Let's assume an MP3 stores 8 sample Fourier transforms, overlapping via windowing. 1: Start with 8 16-bit samples. (For a total of 128 bits from the original CD) 2: Convert to 32 bit float 3: Run a forward Fourier transform 4: Now you're in the frequency domain 5: Keep the amplitude for the 0th frequency bucket. Quantize at 8 bit with companding. (This keeps mid-range frequencies, where the ear is most sensitive, generally lossless.) 6: Apply an exponential function to the higher frequencies amplitude (slots 1, 2, 3, and 4) so that very quiet highs are discarded. Then quantize the highs at 6 bit. 7: We will ignore the phase. Remember that slots 5-7 are just copies of 1-3 8: Now, with slot 0 at 16-bit, and slots 1-4 at 6-bit, the window is a total of 32 bits. Because of windowing, each Fourier transform is crossfaded. (Basically, the first 8-sample transform is at sample 0, the next is at sample 4, the next is at sample 8, and each is cross-faded.) This means that each the ratio of bits is (32 + 32) / 128: 0.5. Further compression (by storing the difference between windows) can probably get to around 0.25