On 2013-01-24 16:51:04 +0100, Kostya Shishkov wrote:
> On Thu, Jan 24, 2013 at 04:47:00PM +0100, Janne Grunau wrote:
> > ---
> >  libavcodec/arm/h264qpel_init_arm.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/libavcodec/arm/h264qpel_init_arm.c 
> > b/libavcodec/arm/h264qpel_init_arm.c
> > index b546c2a..097d0b8 100644
> > --- a/libavcodec/arm/h264qpel_init_arm.c
> > +++ b/libavcodec/arm/h264qpel_init_arm.c
> > @@ -94,10 +94,10 @@ void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, 
> > int);
> >  
> >  void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth)
> >  {
> > -#if HAVE_NEON
> >      const int high_bit_depth = bit_depth > 8;
> > +    int cpu_flags = av_get_cpu_flags();
> >  
> > -    if (!high_bit_depth) {
> > +    if ((have_neon(cpu_flags) && !high_bit_depth) {
> 
> Can this be compiled at all? Looks like a stray (

no. copy-n-paste error and I sent the patch before it compiled. also
missed to include libavutil/arm/cpu.h

> >          c->put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon;
> >          c->put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon;
> >          c->put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon;
> > @@ -166,5 +166,4 @@ void ff_h264qpel_init_arm(H264QpelContext *c, int 
> > bit_depth)
> >          c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon;
> >          c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon;
> >      }
> > -#endif /* HAVE_NEON */
> >  }
> > -- 
> 
> Also I'm not sure that #if HAVE_NEON can be dropped - does compiler not
> complain about missing function declarations? Probably it shouldn't though.

It works with dead code elimination turned on on which we rely for
all/most other arm optimizations too.

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to