[pulseaudio-discuss] Does SBC support dynamically changing bit rates and frame lengths?

pl bossart bossart.nospam at gmail.com
Wed Jan 6 06:47:57 PST 2010


>  Pierre, what do you mean by the size of the PCM? Do you mean the frame
> length? If so, I am confused, because the frame length explicitly depends on
> the bitpool parameter. So, the frame length will change.

You provide nsubbands*nblocks samples as input. This cannot change.

> Moreover, I think that's the whole idea of an adaptive encoding. SBC
> encoding masks sounds that are not audible to the human ear because they are
> overshadowed by other sounds. Depending on how much the encoder can mask the
> frame will be smaller or bigger. My understanding might be wrong. So, please
> correct me.

Oh now I get it. I am afraid you can forget about this idea of
variable bit rate encoding with SBC. What you can do is change the
bitrate if there are too many transmission errors, etc. This means
adapting the bitrate to the link.
But you cannot modify the bitrate within the encoder to improve the
quality. First this might not be supported by the link. And second,
SBC isn't a very good encoder, it's a simplified version of
MPEG1-layer1, somewhat worse than the old Philips digital cassette if
you are old enough to know how bad this was (1990?). There's no real
computation of a masking threshold. It pretty much iteratively
allocates bits to the subbands with the most energy and when the bit
allocation stops, well you get what you get. If I remember well, the
allocation algorithm is used both in the encoder and decoder so your
freedom to improve it is next to nil.
Yet another reason why we should have MP3 direct streaming...
- Pierre



More information about the pulseaudio-discuss mailing list