[vorbis] Low bitrate encoding
Olaf van der Spek
Olaf at XCC.TMFWeb.NL
Tue Jan 9 04:31:39 PST 2001
----- Original Message -----
From: "jaromil" <jaromil at dyne.org>
To: <vorbis at xiph.org>
Sent: Tuesday, January 09, 2001 1:14 PM
Subject: Re: [vorbis] Low bitrate encoding
> On Tue, Jan 09, 2001 at 11:49:09AM +0100, Olaf van der Spek wrote:
>
> > > i am currently working on down/upsampling routines for the next major
> > > release of muse (2:1/1:2, is that meant here?), as far as i get
> something
> > > useful i'll notice - next 2 weeks. found really useful to peek into
> the
> > > sourcecode of SDL (www.libsdl.org) src/audio/SDL_audiocvt.
> >
> > Is downsampling (from 44100 hz to 22500 hz) something else then just
> taking
> > the average of two samples from the read buffer and putting that in the
> > write buffer?
> >
>
> that's not exact... more than averaging it's a stretching operation.
> assuming 16bit samples i would do it like that:
This means you just discard half of the samples.
>
> /* downsampling >>1 */
>
> for(i=src_length>>2;i;--i) {
> dst[0] = src[0];
> dst[1] = src[1];
> src += 4;
> dst += 2;
> }
What about this?
for(i=src_length>>1;i;--i) {
dst[0] = src[0] + src[1];
src += 2;
dst++;
}
>
> /* upsampling <<1 */
>
> for(i=src_lenght>>1;i;--i) {
> src -= 1;
> dst -= 2;
> dst[0] = src[0];
> dst[1] = src[0];
> }
Would it be better to interpolate the second value?
>
> so at the end is really simple
> it's not the first time i see this algorithm,
> i trust it more since i saw sam lantinga using it.
>
> i guess it can be done in asm with mmx lubrification...
>
> jrml
>
> --- >8 ----
> List archives: http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
> containing only the word 'unsubscribe' in the body. No subject is needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
>
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis
mailing list