diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2007-01-13 21:19:52 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2007-01-13 21:19:52 +0000 |
commit | 6e8ff6e5c232de4b8235626af31ab85345120a93 (patch) | |
tree | 25930156aa9f4f2014bf6fe3d65c183262626b8d /src/libffmpeg/libavcodec/i386 | |
parent | 2f5905081ee2040537f043fe4afabbb66d26354e (diff) | |
download | xine-lib-6e8ff6e5c232de4b8235626af31ab85345120a93.tar.gz xine-lib-6e8ff6e5c232de4b8235626af31ab85345120a93.tar.bz2 |
* ffmpeg update to 51.28.0
* Workaround ffmpeg buggy codecs that don't release their DR1 frames.
* Fix several segfaults and freezing problem with H264 streams that use a lot
of reference frames (eg. 15)
* Initial support to enable/disable ffmpeg codecs. Codecs may be disabled in
groups by --disable-ffmpeg-uncommon-codecs/--disable-ffmpeg-popular-codecs
Think of "uncommon" codecs what people would never want to play with their
PDAs (they will save memory by removing them).
Note: currently both uncommon/popular codecs are _build_ but disabled.
that is, build system still need some improvements to really save memory.
warning: non-autoconf guru playing with the build system, likely breakage.
CVS patchset: 8499
CVS date: 2007/01/13 21:19:52
Diffstat (limited to 'src/libffmpeg/libavcodec/i386')
-rw-r--r-- | src/libffmpeg/libavcodec/i386/Makefile.am | 6 | ||||
-rw-r--r-- | src/libffmpeg/libavcodec/i386/cputest.c | 6 | ||||
-rw-r--r-- | src/libffmpeg/libavcodec/i386/fdct_mmx.c | 8 | ||||
-rw-r--r-- | src/libffmpeg/libavcodec/i386/mathops.h | 41 |
4 files changed, 53 insertions, 8 deletions
diff --git a/src/libffmpeg/libavcodec/i386/Makefile.am b/src/libffmpeg/libavcodec/i386/Makefile.am index 15ab4db89..ee170efd5 100644 --- a/src/libffmpeg/libavcodec/i386/Makefile.am +++ b/src/libffmpeg/libavcodec/i386/Makefile.am @@ -6,7 +6,7 @@ AM_CFLAGS = -fomit-frame-pointer -fno-strict-aliasing # CFLAGS is here to filter out -funroll-loops because it causes bad # behavior of libavcodec CFLAGS := `echo @CFLAGS@ | sed -e 's/-funroll-loops//g'` -AM_CPPFLAGS = $(LIBFFMPEG_CPPFLAGS) -I$(top_srcdir)/src/libffmpeg/libavutil +AM_CPPFLAGS = $(LIBFFMPEG_CPPFLAGS) -I$(top_srcdir)/src/libffmpeg/libavutil -I$(top_srcdir)/src/libffmpeg # Avoid "can't find register" failures with -O1 and higher dsputil_mmx.o dsputil_mmx.lo: CFLAGS=$(shell echo @CFLAGS@ | sed -e 's/-funroll-loops//g; s/$$/ -Os/') @@ -42,10 +42,10 @@ EXTRA_DIST = \ h264dsp_mmx.c \ mpegvideo_mmx_template.c -if HAVE_FFMMX +if HAVE_MMX mmx_modules = $(libavcodec_mmx_src) endif libavcodec_mmx_la_SOURCES = $(mmx_modules) $(libavcodec_mmx_dummy) -noinst_HEADERS = dsputil_mmx_avg.h dsputil_mmx_rnd.h mmx.h +noinst_HEADERS = dsputil_mmx_avg.h dsputil_mmx_rnd.h mathops.h mmx.h diff --git a/src/libffmpeg/libavcodec/i386/cputest.c b/src/libffmpeg/libavcodec/i386/cputest.c index 262786b71..0705ab3e5 100644 --- a/src/libffmpeg/libavcodec/i386/cputest.c +++ b/src/libffmpeg/libavcodec/i386/cputest.c @@ -87,6 +87,8 @@ int mm_support(void) rval |= MM_SSE2; if (ecx & 1) rval |= MM_SSE3; + if (ecx & 0x00000200 ) + rval |= MM_SSSE3; } cpuid(0x80000000, max_ext_level, ebx, ecx, edx); @@ -104,11 +106,13 @@ int mm_support(void) } #if 0 - av_log(NULL, AV_LOG_DEBUG, "%s%s%s%s%s%s\n", + av_log(NULL, AV_LOG_DEBUG, "%s%s%s%s%s%s%s%s\n", (rval&MM_MMX) ? "MMX ":"", (rval&MM_MMXEXT) ? "MMX2 ":"", (rval&MM_SSE) ? "SSE ":"", (rval&MM_SSE2) ? "SSE2 ":"", + (rval&MM_SSE3) ? "SSE3 ":"", + (rval&MM_SSSE3) ? "SSSE3 ":"", (rval&MM_3DNOW) ? "3DNow ":"", (rval&MM_3DNOWEXT) ? "3DNowExt ":""); #endif diff --git a/src/libffmpeg/libavcodec/i386/fdct_mmx.c b/src/libffmpeg/libavcodec/i386/fdct_mmx.c index 2ffbfecf6..7e2682a4a 100644 --- a/src/libffmpeg/libavcodec/i386/fdct_mmx.c +++ b/src/libffmpeg/libavcodec/i386/fdct_mmx.c @@ -284,7 +284,7 @@ TABLE_SSE2 }}; -static always_inline void fdct_col(const int16_t *in, int16_t *out, int offset) +static av_always_inline void fdct_col(const int16_t *in, int16_t *out, int offset) { movq_m2r(*(in + offset + 1 * 8), mm0); movq_m2r(*(in + offset + 6 * 8), mm1); @@ -364,7 +364,7 @@ static always_inline void fdct_col(const int16_t *in, int16_t *out, int offset) } -static always_inline void fdct_row_sse2(const int16_t *in, int16_t *out) +static av_always_inline void fdct_row_sse2(const int16_t *in, int16_t *out) { asm volatile( #define FDCT_ROW_SSE2_H1(i,t) \ @@ -426,7 +426,7 @@ static always_inline void fdct_row_sse2(const int16_t *in, int16_t *out) ); } -static always_inline void fdct_row_mmx2(const int16_t *in, int16_t *out, const int16_t *table) +static av_always_inline void fdct_row_mmx2(const int16_t *in, int16_t *out, const int16_t *table) { pshufw_m2r(*(in + 4), mm5, 0x1B); movq_m2r(*(in + 0), mm0); @@ -469,7 +469,7 @@ static always_inline void fdct_row_mmx2(const int16_t *in, int16_t *out, const i movq_r2m(mm7, *(out + 4)); } -static always_inline void fdct_row_mmx(const int16_t *in, int16_t *out, const int16_t *table) +static av_always_inline void fdct_row_mmx(const int16_t *in, int16_t *out, const int16_t *table) { //FIXME reorder (i dont have a old mmx only cpu here to benchmark ...) movd_m2r(*(in + 6), mm1); diff --git a/src/libffmpeg/libavcodec/i386/mathops.h b/src/libffmpeg/libavcodec/i386/mathops.h new file mode 100644 index 000000000..3553a4025 --- /dev/null +++ b/src/libffmpeg/libavcodec/i386/mathops.h @@ -0,0 +1,41 @@ +/* + * simple math operations + * Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> et al + * + * 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 + */ + +#ifdef FRAC_BITS +# define MULL(ra, rb) \ + ({ int rt, dummy; asm (\ + "imull %3 \n\t"\ + "shrdl %4, %%edx, %%eax \n\t"\ + : "=a"(rt), "=d"(dummy)\ + : "a" (ra), "rm" (rb), "i"(FRAC_BITS));\ + rt; }) +#endif + +#define MULH(ra, rb) \ + ({ int rt, dummy;\ + asm ("imull %3\n\t" : "=d"(rt), "=a"(dummy): "a" (ra), "rm" (rb));\ + rt; }) + +#define MUL64(ra, rb) \ + ({ int64_t rt;\ + asm ("imull %2\n\t" : "=A"(rt) : "a" (ra), "g" (rb));\ + rt; }) + |