I am currently (now) attempting an audio compressor/decompressor.
it is using mdct and arithmatic coding, and encoding each value at 16 bits
(the dct tends to result in larger values, but the values have to be
quantized at least this far).
issue: at present I am just dividing everything by values, and adjusting
this values adjusts the sound quality and bitrate (well, that and the
blocksize, which also effects encoder/decoder speed).
I am just not sure if I am doing this right, eg, will non-uniform
quantization tables of the sort used in jpeg-style filters work, and if so,
what is a good way to construct these tables?
at present I am using:
a base value;
a "steepness" value, which is multiplied by the square root of the dct
position;
another concern is what effect the shape of the table might have on the
doppler effect, eg, if a noticable doppler shift results in the sound
quality being noticably bad?
about what is a "good" shape for this?
noticable effects:
as I divide the dct coefficients by larger values, there starts being a
buzzing noise, in combination with the sound gaining a "metallic" or
"glassy" sound. the buzzing noise seems to be at approx the same frequency
as the blocksize.
the blocksize effects speed, and has a noticable effect on sound, the
metallic sound is less noticable with smaller block sizes (and also it goes
faster) however, the buzzing sound is a bit stronger, and there starts to be
kind of a crackling or buzzing effect in the sound itself.
another considered idea:
searching previously encoded blocks for one with a similar set of values and
thus encoding the difference. my guess is this might work ok if the sound
has a lot of repeating patterns, but I am unsure.
test seems to show that this seems to hurt compression some for whatever
reason (or, at least if I do it post quantization, pre-quantization doesn't
seem to really make any difference).
or such