Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread James Almer
On 25/02/15 3:29 PM, Ronald S. Bultje wrote: >> Otherwise i think the second version with builtins i sent is good to >> > apply. Much >> > cleaner than the configure approach to be honest. > > OK. > > Ronald Pushed, thanks. ___ ffmpeg-devel mailing lis

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread Clément Bœsch
On Wed, Feb 25, 2015 at 02:29:11PM -0300, James Almer wrote: > On 25/02/15 12:43 PM, Clément Bœsch wrote: > > On Tue, Feb 24, 2015 at 10:05:24PM -0300, James Almer wrote: > >> Signed-off-by: James Almer > >> --- > >> I decided to go the configure route since other features (cmov, clz) also > >> d

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread Reimar Döffinger
On 25.02.2015, at 19:29, "Ronald S. Bultje" wrote: > Hi, > > On Wed, Feb 25, 2015 at 1:21 PM, James Almer wrote: > >> On 25/02/15 2:58 PM, Ronald S. Bultje wrote: >>> Hi, >>> >>> On Wed, Feb 25, 2015 at 12:52 PM, James Almer wrote: >>> On 25/02/15 2:36 PM, Ronald S. Bultje wrote: >

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread Ronald S. Bultje
Hi, On Wed, Feb 25, 2015 at 1:21 PM, James Almer wrote: > On 25/02/15 2:58 PM, Ronald S. Bultje wrote: > > Hi, > > > > On Wed, Feb 25, 2015 at 12:52 PM, James Almer wrote: > > > >> On 25/02/15 2:36 PM, Ronald S. Bultje wrote: > >>> Hi James, > >>> > >>> On Wed, Feb 25, 2015 at 12:25 PM, James A

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread James Almer
On 25/02/15 2:58 PM, Ronald S. Bultje wrote: > Hi, > > On Wed, Feb 25, 2015 at 12:52 PM, James Almer wrote: > >> On 25/02/15 2:36 PM, Ronald S. Bultje wrote: >>> Hi James, >>> >>> On Wed, Feb 25, 2015 at 12:25 PM, James Almer wrote: >>> On 25/02/15 9:41 AM, Ronald S. Bultje wrote: > Hi

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread Ronald S. Bultje
Hi, On Wed, Feb 25, 2015 at 12:52 PM, James Almer wrote: > On 25/02/15 2:36 PM, Ronald S. Bultje wrote: > > Hi James, > > > > On Wed, Feb 25, 2015 at 12:25 PM, James Almer wrote: > > > >> On 25/02/15 9:41 AM, Ronald S. Bultje wrote: > >>> Hi, > >>> > >>> On Tue, Feb 24, 2015 at 8:05 PM, James A

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread James Almer
On 25/02/15 2:36 PM, Ronald S. Bultje wrote: > Hi James, > > On Wed, Feb 25, 2015 at 12:25 PM, James Almer wrote: > >> On 25/02/15 9:41 AM, Ronald S. Bultje wrote: >>> Hi, >>> >>> On Tue, Feb 24, 2015 at 8:05 PM, James Almer wrote: +#if HAVE_FAST_POPCNT +#if AV_GCC_VERSION_AT_LEA

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread Ronald S. Bultje
Hi James, On Wed, Feb 25, 2015 at 12:25 PM, James Almer wrote: > On 25/02/15 9:41 AM, Ronald S. Bultje wrote: > > Hi, > > > > On Tue, Feb 24, 2015 at 8:05 PM, James Almer wrote: > >> > >> +#if HAVE_FAST_POPCNT > >> +#if AV_GCC_VERSION_AT_LEAST(4,5) > >> +#ifndef av_popcount > >> +#define av

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread James Almer
On 25/02/15 12:43 PM, Clément Bœsch wrote: > On Tue, Feb 24, 2015 at 10:05:24PM -0300, James Almer wrote: >> Signed-off-by: James Almer >> --- >> I decided to go the configure route since other features (cmov, clz) also do >> it , but if prefered this could instead be done with a new intmath.h hea

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread James Almer
On 25/02/15 9:41 AM, Ronald S. Bultje wrote: > Hi, > > On Tue, Feb 24, 2015 at 8:05 PM, James Almer wrote: >> >> +#if HAVE_FAST_POPCNT >> +#if AV_GCC_VERSION_AT_LEAST(4,5) >> +#ifndef av_popcount >> +#define av_popcount __builtin_popcount >> +#endif /* av_popcount */ >> +#if HAVE_FAST_64BIT

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread James Almer
On 25/02/15 12:43 PM, Clément Bœsch wrote: > On Tue, Feb 24, 2015 at 10:05:24PM -0300, James Almer wrote: >> Signed-off-by: James Almer >> --- >> I decided to go the configure route since other features (cmov, clz) also do >> it , but if prefered this could instead be done with a new intmath.h hea

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread Clément Bœsch
On Tue, Feb 24, 2015 at 10:05:24PM -0300, James Almer wrote: > Signed-off-by: James Almer > --- > I decided to go the configure route since other features (cmov, clz) also do > it , but if prefered this could instead be done with a new intmath.h header > in the x86/ folder containing something li

Re: [FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-25 Thread Ronald S. Bultje
Hi, On Tue, Feb 24, 2015 at 8:05 PM, James Almer wrote: > > +#if HAVE_FAST_POPCNT > +#if AV_GCC_VERSION_AT_LEAST(4,5) > +#ifndef av_popcount > +#define av_popcount __builtin_popcount > +#endif /* av_popcount */ > +#if HAVE_FAST_64BIT > +#ifndef av_popcount64 > +#define av_popcount64 __b

[FFmpeg-devel] [PATCH] libavutil: add x86 optimized av_popcount

2015-02-24 Thread James Almer
Signed-off-by: James Almer --- I decided to go the configure route since other features (cmov, clz) also do it , but if prefered this could instead be done with a new intmath.h header in the x86/ folder containing something like #if defined(__GNUC__) && defined(__POPCNT__) #define av_popcoun