[FFmpeg-devel] [PATCH] fix macro redefinition in ac3enc.c

Måns Rullgård mans
Thu Mar 5 20:43:57 CET 2009


Diego Biurrun <diego at biurrun.de> writes:

> Here is a small patch to remove the redundant MUL16 macro from
> libavcodec/ac3enc.c.  The very same macro exists in mathops.h.
> This avoids the warning
>
> libavcodec/ac3enc.c:119:1: warning: "MUL16" redefined
> In file included from libavcodec/bitstream.h:36,
>                  from libavcodec/ac3enc.c:30:
> libavcodec/mathops.h:79:1: warning: this is the location of the previous definition
>
> Diego
>
> Index: libavcodec/ac3enc.c
> ===================================================================
> --- libavcodec/ac3enc.c	(revision 17826)
> +++ libavcodec/ac3enc.c	(working copy)
> @@ -116,8 +116,6 @@
>    qim = (by - ay) >> 1;\
>  }
>  
> -#define MUL16(a,b) ((a) * (b))
> -

Looks OK to me.  I'd still run make test just to be sure.

>  #define CMUL(pre, pim, are, aim, bre, bim) \
>  {\
>     pre = (MUL16(are, bre) - MUL16(aim, bim)) >> 15;\

This reminds me, there are variants of that macro in several places
too.  We should clean it up somehow...

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list