[FFmpeg-devel] [PATCH 1/2] libmodplug: support options (noise reduction, reverb, bass boost, ...)

Clément Bœsch ubitux at gmail.com
Thu Oct 6 08:36:59 CEST 2011


On Thu, Oct 06, 2011 at 12:13:43AM +0200, Michael Niedermayer wrote:
> On Wed, Oct 05, 2011 at 10:49:43PM +0200, Clément Bœsch wrote:
> > ---
> >  libavformat/libmodplug.c |   56 +++++++++++++++++++++++++++++++++++++++++++++-
> >  1 files changed, 55 insertions(+), 1 deletions(-)
> > 
> > diff --git a/libavformat/libmodplug.c b/libavformat/libmodplug.c
> > index b4978b9..2f7c4fa 100644
> > --- a/libavformat/libmodplug.c
> > +++ b/libavformat/libmodplug.c
> > @@ -19,18 +19,48 @@
> >  /**
> >  * @file
> >  * ModPlug demuxer
> > -* @todo ModPlug options (noise reduction, reverb, bass boost, ...)
> >  * @todo metadata
> >  */
> >  
> >  #include <libmodplug/modplug.h>
> > +#include "libavutil/opt.h"
> >  #include "avformat.h"
> >  
> >  typedef struct ModPlugContext {
> > +    const AVClass *class;
> >      ModPlugFile *f;
> >      uint8_t buf[5 * 1<<20]; ///< input file content, 5M max
> > +
> > +    /* options */
> > +    int noise_reduction;
> > +    int reverb_depth;
> > +    int reverb_delay;
> > +    int bass_amount;
> > +    int bass_range;
> > +    int surround_depth;
> > +    int surround_delay;
> >  } ModPlugContext;
> >  
> > +#define OFFSET(x) offsetof(ModPlugContext, x)
> > +#define D AV_OPT_FLAG_DECODING_PARAM
> > +static const AVOption options[] = {
> > +    {"noise_reduction", "Enable noise reduction 0(off)-1(on)",  OFFSET(noise_reduction), FF_OPT_TYPE_INT, {.i64 = 0}, 0,       1, D},
> 
>  FF_OPT_TYPE_INT uses dbl not i64
> 
> otherwise LGTM
> 

Pushed with that change.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111006/c71f06c6/attachment.asc>


More information about the ffmpeg-devel mailing list