[Ffmpeg-devel] [PATCH] Vorbis Encoder
Oded Shimon
ods15
Sat Sep 30 22:33:49 CEST 2006
$subj
Some cleanups still left - move the codebook stuff to a seperate file,
move the bitstream stuff to bitstream.h . Will move the codebook stuff
only after moving to ffmpeg repo...
This will be commited using ~90 commits for full history, with an
additional commit at the end for makefile/avocdec.h/allcodecs.c
Quality is comparable to official vorbis encoder (to my ears), at similar
bitrate. bitrate and quality can be manipulated with -aq, 10 to 30 are
sane values, the higher the number, the higher the bitrate/quality.
Only 2 channel is supported, and, in a psy sense, 44100/48000 is best
supported...
Open for review... :)
- ods15
-------------- next part --------------
Index: libavcodec/allcodecs.c
===================================================================
--- libavcodec/allcodecs.c (revision 6398)
+++ libavcodec/allcodecs.c (working copy)
@@ -51,7 +51,7 @@
#endif //CONFIG_MP3LAME_ENCODER
#endif
#ifdef CONFIG_LIBVORBIS
-#ifdef CONFIG_OGGVORBIS_ENCODER
+#if (defined CONFIG_OGGVORBIS_ENCODER && !defined CONFIG_VORBIS_ENCODER)
register_avcodec(&oggvorbis_encoder);
#endif //CONFIG_OGGVORBIS_ENCODER
#if (defined CONFIG_OGGVORBIS_DECODER && !defined CONFIG_VORBIS_DECODER)
@@ -507,6 +507,9 @@
#ifdef CONFIG_VORBIS_DECODER
register_avcodec(&vorbis_decoder);
#endif
+#ifdef CONFIG_VORBIS_ENCODER
+ register_avcodec(&vorbis_encoder);
+#endif
#ifdef CONFIG_LIBGSM
register_avcodec(&libgsm_decoder);
#endif //CONFIG_LIBGSM
Index: libavcodec/Makefile
===================================================================
--- libavcodec/Makefile (revision 6398)
+++ libavcodec/Makefile (working copy)
@@ -122,6 +122,7 @@
OBJS-$(CONFIG_VMDVIDEO_DECODER) += vmdav.o
OBJS-$(CONFIG_VMNC_DECODER) += vmnc.o
OBJS-$(CONFIG_VORBIS_DECODER) += vorbis.o vorbis_data.o
+OBJS-$(CONFIG_VORBIS_ENCODER) += vorbis_enc.o vorbis_data.o
OBJS-$(CONFIG_VP3_DECODER) += vp3.o
OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o
OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o
Index: libavcodec/avcodec.h
===================================================================
--- libavcodec/avcodec.h (revision 6398)
+++ libavcodec/avcodec.h (working copy)
@@ -2162,6 +2162,7 @@
extern AVCodec vcr1_encoder;
extern AVCodec ffv1_encoder;
extern AVCodec snow_encoder;
+extern AVCodec vorbis_encoder;
extern AVCodec mdec_encoder;
extern AVCodec zlib_encoder;
extern AVCodec sonic_encoder;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vorbis_enc.c
Type: text/x-csrc
Size: 54882 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060930/4a43c72b/attachment.c>
More information about the ffmpeg-devel
mailing list