[theora-dev] Re: Re: [Ffmpeg-devel] FFmpeg Theora encoding patch

Paul Richards paul.richards at gmail.com
Sun Jan 7 06:58:25 PST 2007


On 06/01/07, Måns Rullgård <mru at inprovide.com> wrote:
> "Paul Richards" <paul.richards at gmail.com> writes:
>
> > Hi,
> > Attached is my patch to add theora encoding to ffmpeg's libavcodec (by
> > using libtheora).  I am requesting help to fix the bug I mention below
> > and am seeking general comments before I submit the patch properly.
> >
> > Files encoded using this encoder have a problem playing in VLC.  The
> > files will not play unless "Drop late frames" has been unticked in the
> > advanced video settings.  Hopefully someone can tell me where this
> > problem comes from.  I am not sure which API (FFmpeg or libtheora) I
> > am misusing.
> >
> > Index: libavcodec/vp3.c
> > ===================================================================
> > --- libavcodec/vp3.c  (revision 7409)
> > +++ libavcodec/vp3.c  (working copy)
> > @@ -2643,7 +2643,6 @@
> >      NULL
> >  };
> >
> > -#ifndef CONFIG_LIBTHEORA
> >  AVCodec theora_decoder = {
> >      "theora",
> >      CODEC_TYPE_VIDEO,
> > @@ -2656,4 +2655,3 @@
> >      0,
> >      NULL
> >  };
> > -#endif
>
> Why?

The author of the vp3 decoder assumed that when libtheora was hooked
up it would take over the job of theora decoding.  My patch only uses
libtheora for encoding, and so the vp3 theora decoder is still needed
despite CONFIG_LIBTHEORA now being defined.

>
> > +OBJS-$(CONFIG_THEORA_ENCODER)          += theora_enc.o
>
> Personally I'd prefer calling the file libtheoraenc.c or something
> similar.  The name theoraenc.c should be reserved for a possible
> future native implementation.
>

Ok, I've renamed the source file locally.  When I roll up the other
changes suggested on this thread I'll email my (hopefully final)
patch.


-- 
Paul Richards


More information about the theora-dev mailing list