On Wed, Feb 08, 2012 at 12:40:51PM +0100, Diego Biurrun wrote:
> 
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1729,7 +1729,10 @@ typedef struct AVCodecContext {
>  #define FF_IDCT_LIBMPEG2MMX   4
> -#define FF_IDCT_PS2           5
> +#define FF_IDCT_MMI           5
> +#if LIBAVCODEC_VERSION_MAJOR == 54
> +#define FF_IDCT_PS2           FF_IDCT_MMI
> +#endif
>  #define FF_IDCT_ARM           7
> --- a/libavcodec/options.c
> +++ b/libavcodec/options.c
> @@ -214,7 +214,10 @@ static const AVOption options[]={
>  {"libmpeg2mmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_LIBMPEG2MMX }, 
> INT_MIN, INT_MAX, V|E|D, "idct"},
> -{"ps2", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_PS2 }, INT_MIN, INT_MAX, 
> V|E|D, "idct"},
> +#if LIBAVCODEC_VERSION_MAJOR == 54
> +{"ps2", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_MMI }, INT_MIN, INT_MAX, 
> V|E|D, "idct"},
> +#endif
> +{"mmi", NULL, 0, AV_OPT_TYPE_CONST, { .dbl = FF_IDCT_MMI }, INT_MIN, 
> INT_MAX, V|E|D, "idct"},
>  {"arm", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ARM }, INT_MIN, INT_MAX, 
> V|E|D, "idct"},

Is it still open season for API changes?  Then I could just drop the
ugly ifdeffery.

And while we're at it - what about changing all those #defines into an
enum?

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to