[FFmpeg-devel] [PATCH 10/15] vp9/x86: make filter_88_v work on 32-bit.

Ronald S. Bultje rsbultje at gmail.com
Sat Dec 27 21:12:52 CET 2014


Hi,

On Sat, Dec 27, 2014 at 1:23 PM, Clément Bœsch <u at pkh.me> wrote:

> On Sat, Dec 27, 2014 at 11:02:45AM -0500, Ronald S. Bultje wrote:
> > ---
> >  libavcodec/x86/vp9dsp_init.c |   2 +-
> >  libavcodec/x86/vp9lpf.asm    | 153
> ++++++++++++++++++++++++++++++-------------
> >  2 files changed, 107 insertions(+), 48 deletions(-)
> >
> > diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c
> > index d89843e..6c58c6c 100644
> > --- a/libavcodec/x86/vp9dsp_init.c
> > +++ b/libavcodec/x86/vp9dsp_init.c
> > @@ -361,8 +361,8 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp)
> >          dsp->loop_filter_mix2[1][0][0] =
> ff_vp9_loop_filter_h_84_16_##opt; \
> >          dsp->loop_filter_mix2[1][0][1] =
> ff_vp9_loop_filter_v_84_16_##opt; \
> >          dsp->loop_filter_mix2[1][1][0] =
> ff_vp9_loop_filter_h_88_16_##opt; \
> > -        dsp->loop_filter_mix2[1][1][1] =
> ff_vp9_loop_filter_v_88_16_##opt; \
> >      } \
> > +    dsp->loop_filter_mix2[1][1][1] = ff_vp9_loop_filter_v_88_16_##opt; \
> >  } while (0)
> >
> >  #define init_ipred(sz, opt, t, e) \
> > diff --git a/libavcodec/x86/vp9lpf.asm b/libavcodec/x86/vp9lpf.asm
> > index d00ba7f..2759031 100644
> > --- a/libavcodec/x86/vp9lpf.asm
> > +++ b/libavcodec/x86/vp9lpf.asm
> > @@ -50,6 +50,22 @@ mask_mix48: times 8 db 0x00
> >
> >  SECTION .text
> >
> > +%macro SCRATCH 3
> > +%if ARCH_X86_64
> > +    SWAP                %1, %2
> > +%else
> > +    mova              [%3], m%1
> > +%endif
> > +%endmacro
> > +
> > +%macro UNSCRATCH 3
> > +%if ARCH_X86_64
> > +    SWAP                %1, %2
> > +%else
> > +    mova               m%1, [%3]
> > +%endif
> > +%endmacro
> > +
> >  ; %1 = abs(%2-%3)
> >  %macro ABSSUB 4 ; dst, src1 (RO), src2 (RO), tmp
> >  %if ARCH_X86_64
> > @@ -84,12 +100,25 @@ SECTION .text
> >      por                 %1, %4              ; new&mask | old&~mask
> >  %endmacro
> >
> > -%macro FILTER_SUBx2_ADDx2 9-10 "" ; %1=dst %2=h/l %3=cache %4=stack_off
> %5=sub1 %6=sub2 %7=add1 %8=add2 %9=rshift, [unpack]
> > +%macro UNPACK 4
> > +%if ARCH_X86_64
> > +    punpck%1bw          %2, %3, %4
> > +%else
> > +    mova                %2, %3
> > +    punpck%1bw          %2, %4
> > +%endif
> > +%endmacro
> > +
> > +%macro FILTER_SUBx2_ADDx2 11 ; %1=dst %2=h/l %3=cache %4=stack_off
> %5=sub1 %6=sub2 %7=add1 %8=add2 %9=rshift, [unpack]
>
> Please update the macro comment
>

Done (and split in two lines, it was getting really long).

Ronald


More information about the ffmpeg-devel mailing list