HydrogenAudio

Lossy Audio Compression => Other Lossy Codecs => Topic started by: Database4 on 2010-10-30 17:47:28

Title: SNR bit allocation method in SBC
Post by: Database4 on 2010-10-30 17:47:28
Hi,
I am new to the audio, and i am trying to understand SBC Encoder. How SNR bit allocation method is related to the signal to noise ration?
In calculation of the scale factors, can we take scale factor of subband as number of bits of max subband sample?

Please help me to understand above.

Thanks in advance.

Regards,
Sapthagiri.
Title: SNR bit allocation method in SBC
Post by: SebastianG on 2010-12-09 12:49:38
I am new to the audio, and i am trying to understand SBC Encoder. How SNR bit allocation method is related to the signal to noise ratio?

In calculation of the scale factors, can we take scale factor of subband as number of bits of max subband sample?

Yes. That's the idea. This will lead to a flat quantization noise spectrum. In terms of psychoacoustics this is not desirable though. The other bit allocation approach is still very simple but accounts for some psychoacoustic effects. So, if I recall correctly, it's be like this:
Code: [Select]
// for SNR bit allocation strategy
bitsneeded = scalefactor

// for the other strategy
bitsneeded = (scalefactor - table[subband]) / 2;

where table contains some offsets depending on the frequency.

Then, allocation is iterativly adjusted so that nearly all bits from the bit pool are spent.