[Ffmpeg-devel] [PATCH] Vorbis Encoder

Oded Shimon ods15
Sun Oct 1 19:42:39 CEST 2006


On Sun, Oct 01, 2006 at 05:43:47PM +0200, Michael Niedermayer wrote:
> On Sun, Oct 01, 2006 at 02:04:59PM +0200, Oded Shimon wrote:
> >     lx = 0;
> >     ly = posts[0] * fc->multiplier; // sorted 0 is still 0
> >     for (i = 1; i < fc->values; i++) {
> >         int pos = fc->list[i].sort;
> >         if (coded[pos]) {
> >             render_line(lx, ly, fc->list[pos].x, posts[pos] * fc->multiplier, floor, samples);
> >             lx = fc->list[pos].x;
> >             ly = posts[pos] * fc->multiplier;
> >         }
> >         if (lx >= samples) break;
> >     }
> >     if (lx < samples) render_line(lx, ly, samples, ly, floor, samples);
> 
> this looks duplicated from the end of vorbis_floor1_decode()

fixed

...

anything else? :)

re-attaching for ease of further critisim in reply :)

- 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: 56736 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061001/9f4ef847/attachment.c>



More information about the ffmpeg-devel mailing list