[FFmpeg-devel] [PATCH] lavu/intmath.h: fix compilation with msvc10.

Matt Oliver protogonoi at gmail.com
Fri Jun 10 16:00:35 CEST 2016


On 10 June 2016 at 05:30, Michael Niedermayer <michael at niedermayer.cc>
wrote:

> On Mon, Jun 06, 2016 at 05:11:34PM +1000, Matt Oliver wrote:
> > ---
> >  libavutil/x86/intmath.h | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/libavutil/x86/intmath.h b/libavutil/x86/intmath.h
> > index f58b0d0..de177dd 100644
> > --- a/libavutil/x86/intmath.h
> > +++ b/libavutil/x86/intmath.h
> > @@ -47,6 +47,7 @@ static av_always_inline av_const int
> ff_log2_x86(unsigned
> > int v)
> >  #   endif
> >  #   define ff_log2_16bit av_log2
> >
> > +#if defined(_MSC_VER) && (_MSC_VER >= 1700)
> >  #   define ff_ctz(v) _tzcnt_u32(v)
>
> should this not be some configre based chec like
> CONFIG_TZCNT_U32
> ?
>

It could be but this is just checking for the availability of an intrinsic
used with msvc that is available for all msvc versions except 2010. So a
configure chck would just tell us what this code is doing anyway. Given
that this is msvc specific I didnt think it worth cluttering up configure
for such a rare usecase. Especially seeing as how we are not also checking
for all the gcc specific builtins or icl intrinsics used in this file and
in others and adding all those to configure would add considerable bloat.
So it can be added to configure if desired but for such a simple and msvc
specific case I would recommend not affecting other build chains by adding
it to configure.


More information about the ffmpeg-devel mailing list