[FFmpeg-devel] [PATCH v2 3/4] mips: port optimizations to mips n64

James Cowgill james410 at cowgill.org.uk
Sat Mar 7 11:10:35 CET 2015


On Sat, 2015-03-07 at 10:15 +0100, Michael Niedermayer wrote:
> On Sat, Mar 07, 2015 at 02:47:51AM -0300, James Almer wrote:
> > On 05/03/15 2:40 PM, James Cowgill wrote:
> > > diff --git a/libavutil/mips/asmdefs.h b/libavutil/mips/asmdefs.h
> > > new file mode 100644
> > > index 0000000..4d2922c
> > > --- /dev/null
> > > +++ b/libavutil/mips/asmdefs.h
> > > @@ -0,0 +1,48 @@
> > > +/*
> > > + * Copyright (c) 2015 Imagination Technologies Ltd
> > > + *
> > > + * This file is part of FFmpeg.
> > > + *
> > > + * FFmpeg is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU Lesser General Public
> > > + * License as published by the Free Software Foundation; either
> > > + * version 2.1 of the License, or (at your option) any later version.
> > > + *
> > > + * FFmpeg is distributed in the hope that it will be useful,
> > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > > + * Lesser General Public License for more details.
> > > + *
> > > + * You should have received a copy of the GNU Lesser General Public
> > > + * License along with FFmpeg; if not, write to the Free Software
> > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > > + */
> > > +
> > > +/**
> > > + * @file
> > > + * MIPS assembly defines from sys/asm.h but rewritten for use with C inline
> > > + * assembly (rather than from within .s files).
> > > + */
> > > +
> > > +#ifndef AVCODEC_MIPS_ASMDEFS_H
> > > +#define AVCODEC_MIPS_ASMDEFS_H
> > > +
> > > +#include <sgidefs.h>
> > > +
> > > +#if _MIPS_SIM == _ABI64
> > 
> > This broke compilation with Android NDK r8 (Which apparently doesn't support mips 64 bits).
> > http://fate.ffmpeg.org/report.cgi?time=20150307052927&slot=mipsel-android-gcc-4.4
> > 
> > CC	libavutil/mips/float_dsp_mips.o
> > mipsel-linux-android-gcc-4.4.3: unrecognized option '-pthreads'
> > In file included from /home/fate/fate/src/libavcodec/mips/aacdec_mips.h:61,
> >                  from /home/fate/fate/src/libavcodec/aacdec.c:113:
> > /home/fate/fate/src/libavutil/mips/asmdefs.h:30:21: error: sgidefs.h: No such file or directory
> > /home/fate/fate/src/libavutil/mips/asmdefs.h:32:18: warning: "_ABI64" is not defined
> > make: *** [libavcodec/aacdec.o] Error 1

Lovely. It looks like sgidefs.h was only added in lollipop (even though
it's been everywhere else for years):
https://github.com/android/platform_bionic/commit/1c2cf23a0c54619e7a362e1b82b0fb37ec9dd11a

But there's still asm/sgidefs.h defined in the linux kernel headers we
can use instead (give me a moment).

James



More information about the ffmpeg-devel mailing list