[FFmpeg-devel] [PATCH] Default to using libraries when enabled

Michael Niedermayer michaelni
Sun May 23 18:41:35 CEST 2010


On Sat, May 22, 2010 at 12:48:02PM +0200, Janne Grunau wrote:
> On Fri, May 21, 2010 at 03:05:50PM -0700, Baptiste Coudurier wrote:
> > Hi guys,
> > 
> > On 05/20/2009 05:20 PM, David Conrad wrote:
> > > Hi,
> > >
> > > This changes the order of initialization so that external libraries that
> > > are enabled are used by default over native codecs. My main motivation
> > > in moving these is to be able to have the ogg and mkv muxers default to
> > > encoding via libvorbis if it's enabled; currently, specifying
> > > CODEC_ID_VORBIS will use the native encoder regardless, which is much
> > > worse quality.
> > 
> > I'd like to revive this thread.
> > It's been more than a year, and nothing has been done on the native 
> > vorbis encoder to improve it's quality.
> > 
> > While the patch is questionable for all codecs, I think it is not for 
> > vorbis.
> > 
> > Can we please make everything so libvorbis is used by default when it is 
> > compiled in ?
> 
> See attached patches for selections by codec id. Beside the aac and vorbis
> encoder are there other codecs which should be considered experimental?
> It's more tricky for selections by codec name since the names are unique.
> The best solution is probably to fail in ffmpeg if the encoder is experimental
> and -strict (or something else) is not set.
> 
> Janne

>  avcodec.h |    4 ++++
>  utils.c   |   24 ++++++++++++++++--------
>  2 files changed, 20 insertions(+), 8 deletions(-)
> 62657abb5bcdd4c0791216099c04dc0e3b6cde36  avoid_experimental_codecs.diff
> commit 75273f4917cf21fcab6da91c048fae5955012b68
> Author: Janne Grunau <janne at grunau.be>
> Date:   Sat May 22 02:19:30 2010 +0200
> 
>     add CODEC_CAP_EXPERIMENTAL and prefer codecs without this capability
>     
>     avcodec_find_{de|en}coder returns only imidiately if CODEC_CAP_EXPERIMENTAL
>     is not set. The first experimental codec is saved and returned if no other
>     codec was found.
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 8781c0a..a0d6498 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -645,6 +645,10 @@ typedef struct RcOverride{
>   * as a last resort.
>   */
>  #define CODEC_CAP_SUBFRAMES        0x0100
> +/**
> + * Codec is experimental

// and is thus avoided in favor of non experimental encoders

the rest of the patch is ok with me

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100523/a88a15e0/attachment.pgp>



More information about the ffmpeg-devel mailing list