[vorbis-dev] Clean separation of encode and decode?

David Etherton etherton at rockstarsandiego.com
Wed May 21 10:57:37 PDT 2003



> I don't think this is a good choice.  Because you'll end up with
> libvorbis that can encode/decode and libvorbis that can only decode, and
> it will end up causing confusion.  If we wanted to do this, we'd really
> need to separate stuff into two libs.  libvorbisdec and libvorbisenc.

How about something along the lines of

.if wants_decode_only
CFLAGS += -DDECODE_ONLY
OUTPUT_LIB = libvorbisdec.a
.else
OUTPUT_LIB = libvorbis.a
.endif

In other words, libvorbis always does encode and decode.  Or, just build the
code twice with different output directories.  I would imagine most people
making encoders don't care if they get the decode code in there as well.
Also, the #ifndef method has minimal impact on existing code (see my other
email -- the patch is under 2k).

> You mentioned platform issues being the impetus here...  any reason you
> can't just use tremor instead of libvorbis?  Afaik, the API is the same,
> and it is quite portable C IIRC.

I've been down that road; problem is that my platform (PlayStation2) has
better floating-point performance than 32-bit-integer performance (two-wide
32-bit int support, eight-wide 16-bit int support, the latter of which is
useless for mdct_backward according to others here); also, it has a
dedicated coprocessor with 256 quadwords of floating-point vector memory
which would be a great candidate for mdct_backward.

-Dave

--- >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-dev-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-dev mailing list