Måns Rullgård | 1 Aug 01:00 2012

Re: [PATCH 02/45] x86: build: replace mmx2 by mmxext

"Ronald S. Bultje" <rsbultje@...> writes:

> Hi,
>
> On Tue, Jul 31, 2012 at 3:17 PM, Diego Biurrun <diego@...> wrote:
> [..]
>
> The most important thing is missing: why?

mmxext is a somewhat more official name.

--

-- 
Måns Rullgård
mans@...
Loren Merritt | 1 Aug 01:05 2012

Re: [PATCH 43/45] x86: Refactor PSWAPD fallback implementations and port to cpuflags

On Wed, 1 Aug 2012, Diego Biurrun wrote:

> diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
> index 6911a9c..f358257 100644
> --- a/libavutil/x86/x86util.asm
> +++ b/libavutil/x86/x86util.asm
>  <at>  <at>  -306,6 +306,23  <at>  <at> 
>      %endif
>  %endmacro
>
> +%macro PSWAPD 2
> +%if cpuflag(sse)
> +    pshufw %1, %2, 0x4e

That's mmx2.
The macro was called sse because it was in a float function which thus
didn't have a mmx2 version.

> +%elif cpuflag(3dnowext)
> +    pswapd %1, %2
> +%else
> +%ifidn %1, %2
> +    movd [r0+12], %1
> +    punpckhdq %1, [r0+8]
> +%else
> +    movq  %1, %2
> +    psrlq %1, 32
> +    punpckldq %1, %2
> +%endif
> +%endif
(Continue reading)

Ronald S. Bultje | 1 Aug 01:12 2012
Picon

Re: [PATCH 43/45] x86: Refactor PSWAPD fallback implementations and port to cpuflags

Hi,

On Tue, Jul 31, 2012 at 3:18 PM, Diego Biurrun <diego@...> wrote:
> diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
[..]
> +%macro PSWAPD 2
[..]
> +%ifidn %1, %2
> +    movd [r0+12], %1
> +    punpckhdq %1, [r0+8]
> +%else

No. No, no, no, no, no. No.

Ronald
Justin Ruggles | 1 Aug 01:30 2012
Picon

Re: [PATCH 11/45] x86: dct32: port to cpuflags

On 07/31/2012 06:17 PM, Diego Biurrun wrote:
> -%macro BUTTERFLY_SSE 4
> +%macro BUTTERFLY 4
> +%if cpuflag(avx)
> +    vsubps  %4, %1, %2
> +    vaddps  %2, %2, %1
> +    vmulps  %1, %4, %3
> +%elif cpuflag(sse)
>      movaps %4, %1
>      subps  %1, %2
>      addps  %2, %4
>      mulps  %1, %3
> +%endif
>  %endmacro

The avx/sse abstraction in x86inc.asm can do all that in 1 version
without the if/else.

-Justin

Diego Biurrun | 1 Aug 01:31 2012
Picon

Re: Port all YASM code to cpuflags

On Wed, Aug 01, 2012 at 12:17:24AM +0200, Diego Biurrun wrote:
> 
> [PATCH 45/45] x86: fft_mmx: Refactor INTERL macro with cpuflags
> 
> This one is still broken with 3dnow.  I am mystified.

Forgot to say, I ran this through fate with the following combinations
of arches and cpuflags:

x86_32: mmx, 3dnow, 3dnowext
x86_64: mmx, mmxext, sse, sse2, ssse3

More testing is always welcome.

Diego
Ronald S. Bultje | 1 Aug 01:33 2012
Picon

Re: [PATCH 30/45] x86: vp8dsp: port FILTER_BILINEAR macro to cpuflags

Hi,

On Tue, Jul 31, 2012 at 3:17 PM, Diego Biurrun <diego@...> wrote:
> ---
>  libavcodec/x86/vp8dsp.asm |  143 +++++++++++++++++++++------------------------
>  1 files changed, 66 insertions(+), 77 deletions(-)

This is silly, the two codepaths share not a single instruction.

Also, this isn't a port to cpuflags, all of vp8dsp already uses
cpuflags. It ports a macro to use cpuflags:

%macro version_ssse3
..
%endmacro

%macro version_mmx2
..
%endmacro

becomes

%macro version
%if cpuflag(ssse3)
..
%else
..
%endif
%endmacro

(Continue reading)

Diego Biurrun | 1 Aug 01:33 2012
Picon

Re: [PATCH 02/45] x86: build: replace mmx2 by mmxext

On Wed, Aug 01, 2012 at 12:00:58AM +0100, Måns Rullgård wrote:
> "Ronald S. Bultje" <rsbultje@...> writes:
> > On Tue, Jul 31, 2012 at 3:17 PM, Diego Biurrun <diego@...> wrote:
> > [..]
> >
> > The most important thing is missing: why?
> 
> mmxext is a somewhat more official name.

Yes, see my introductory email for the series.  I had to unify in one
direction or the other, so I picked the one that appeared more
sensible, i.e. the more official names.

Diego
Ronald S. Bultje | 1 Aug 01:36 2012
Picon

Re: [PATCH 31/45] x86: proresdsp: improve SIGNEXTEND macro comments

Hi,

On Tue, Jul 31, 2012 at 3:17 PM, Diego Biurrun <diego@...> wrote:
> ---
>  libavcodec/x86/proresdsp.asm |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm
> index 93759bc..91e0800 100644
> --- a/libavcodec/x86/proresdsp.asm
> +++ b/libavcodec/x86/proresdsp.asm
>  <at>  <at>  -404,12 +404,12  <at>  <at>  cglobal prores_idct_put_10, 4, 4, %1
>      RET
>  %endmacro
>
> -%macro SIGNEXTEND 2-3 ; dstlow, dsthigh, tmp
> -%if cpuflag(sse4)
> +%macro SIGNEXTEND 2-3
> +%if cpuflag(sse4) ; dstlow, dsthigh
>      movhlps     %2,  %1
>      pmovsxwd    %1,  %1
>      pmovsxwd    %2,  %2
> -%else ; sse2
> +%elif cpuflag(sse2) ; dstlow, dsthigh, tmp
>      pxor        %3,  %3
>      pcmpgtw     %3,  %1
>      mova        %2,  %1
> --
> 1.7.2.5

(Continue reading)

Diego Biurrun | 1 Aug 01:37 2012
Picon

Re: [PATCH] x86/dsputilenc: bury inline asm under HAVE_INLINE_ASM.

On Tue, Jul 31, 2012 at 03:46:55PM -0700, Ronald S. Bultje wrote:
> On Tue, Jul 31, 2012 at 3:43 PM, Diego Biurrun <diego <at> biurrun.de> wrote:
> > On Wed, Jul 25, 2012 at 08:30:19PM -0700, Ronald S. Bultje wrote:
> >>
> >> --- a/libavcodec/dct-test.c
> >> +++ b/libavcodec/dct-test.c
> >>  <at>  <at>  -85,7 +85,7  <at>  <at>  static const struct algo fdct_tab[] = {
> >>      { "IJG-AAN-INT",    ff_fdct_ifast,         SCALE_PERM },
> >>      { "IJG-LLM-INT",    ff_jpeg_fdct_islow_8,  NO_PERM    },
> >>
> >> -#if HAVE_MMX
> >> +#if HAVE_MMX && HAVE_INLINE_ASM
> >>      { "MMX",            ff_fdct_mmx,           NO_PERM,   AV_CPU_FLAG_MMX     },
> >>      { "MMX2",           ff_fdct_mmx2,          NO_PERM,   AV_CPU_FLAG_MMX2    },
> >>      { "SSE2",           ff_fdct_sse2,          NO_PERM,   AV_CPU_FLAG_SSE2    },
> >
> > Drop this controversial hunk from the patch for now, the rest is OK.
> 
> Can we please leave structure of asm init functions out of this
> discussion? I'm leaving it exactly as it was before, so if you want to
> change that, it should be discussed separately and done on its own
> merit, not within this discussion.

Sure, leave the init part as-is, drop the hunk above and we're good
to go.

Diego
_______________________________________________
libav-devel mailing list
libav-devel <at> libav.org
(Continue reading)

Ronald S. Bultje | 1 Aug 01:39 2012
Picon

Re: [PATCH 21/45] x86: h264_intrapred_10bit: port to cpuflags

Hi,

On Tue, Jul 31, 2012 at 3:17 PM, Diego Biurrun <diego@...> wrote:
> ---
>  libavcodec/x86/h264_intrapred_10bit.asm |  307 ++++++++++++++++---------------
>  1 files changed, 158 insertions(+), 149 deletions(-)

OK.

Ronald

Gmane