[FFmpeg-devel] [PATCH] ffmpeg.c -me option implemented as an AVOption

Stefano Sabatini stefano.sabatini-lala
Thu Jul 5 15:12:56 CEST 2007

Hi all,

I spent some time trying to understand how the AVOption system works,
and now there is a patch which simplifies ffmpeg.c, replacing
opt_motion_estimation with an AVOption setting (operated by

Named values for -me_method are now supported in a simpler and cleaner
way through the AVOption system.

One problem is that the patch is *not backward compatile*, since it
changes the OptionDef option "me" with the predefined "me_method"
AVOption defined in libavcodec/utils.c.

If you think this is a problem I can modify the patch in order to
support the old option name with something as:

{"me", "set motion estimation method (deprecated, use me_method insted)", 
 OFFSET(me_method), FF_OPT_TYPE_INT, ME_EPZS, INT_MIN, INT_MAX, V|E, "me_method"},

in libavcodec/utils.c:options.

BTW: I noted that there are many OptionDef options in ffmpeg.c which
can be implemented as AVOptions ones, resulting in simpler code. Is it
OK to change them in this way too?

Kind regards.
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: me-method-as-avoption-00.patch
Type: text/x-diff
Size: 5547 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070705/e671f375/attachment.patch>

More information about the ffmpeg-devel mailing list