diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-26 00:58:15 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-01-26 00:58:15 +0200 |
commit | dd888b05ff3af1c6c35582e75bedae687d38fc66 (patch) | |
tree | 7f6f162208cd2d32a6a7ac2cfa886e8befadf4f9 | |
parent | 0406d951209df261970424256d76f293649ec140 (diff) | |
parent | 85b28eb411cfa304f1714219ebd17b10a0977fa3 (diff) | |
download | mpv-dd888b05ff3af1c6c35582e75bedae687d38fc66.tar.bz2 mpv-dd888b05ff3af1c6c35582e75bedae687d38fc66.tar.xz |
Merge svn changes up to r28366
Contains more changes needed to sync build system with latest FFmpeg.
Conflicts:
Makefile
configure
mplayer.c
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | av_opts.h | 5 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | cpudetect.c | 2 | ||||
-rw-r--r-- | input/lirc.c | 2 | ||||
-rw-r--r-- | liba52/imdct.c | 12 | ||||
-rw-r--r-- | liba52/imdct_3dnow.h | 28 | ||||
-rw-r--r-- | liba52/liba52_changes.diff | 6 | ||||
-rw-r--r-- | liba52/srfftp_3dnow.h | 4 | ||||
-rw-r--r-- | libaf/af_resample.c | 1 | ||||
-rw-r--r-- | libmpcodecs/vf_fspp.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vf_mcdeint.c | 5 | ||||
-rw-r--r-- | libmpcodecs/vf_pp.c | 3 | ||||
-rw-r--r-- | libmpcodecs/vf_spp.c | 5 | ||||
-rw-r--r-- | libswscale/rgb2rgb.c | 12 | ||||
-rw-r--r-- | libswscale/rgb2rgb_template.c | 10 | ||||
-rw-r--r-- | libswscale/swscale.c | 135 | ||||
-rw-r--r-- | libswscale/swscale_internal.h | 2 | ||||
-rw-r--r-- | libswscale/swscale_template.c | 6 | ||||
-rw-r--r-- | libswscale/yuv2rgb.c | 4 | ||||
-rw-r--r-- | libswscale/yuv2rgb_template.c | 2 | ||||
-rw-r--r-- | mencoder.c | 39 | ||||
-rw-r--r-- | mp3lib/dct64_sse.c | 2 | ||||
-rw-r--r-- | mp3lib/sr1.c | 10 | ||||
-rw-r--r-- | mpcommon.c | 51 | ||||
-rw-r--r-- | mpcommon.h | 2 | ||||
-rw-r--r-- | mplayer.c | 43 | ||||
-rw-r--r-- | playtree.c | 4 | ||||
-rw-r--r-- | playtreeparser.c | 2 | ||||
-rw-r--r-- | stream/freesdp/parser.c | 2 | ||||
-rwxr-xr-x | version.sh | 2 |
31 files changed, 211 insertions, 202 deletions
@@ -391,7 +391,7 @@ SRCS_COMMON-$(MP3LIB) += libmpcodecs/ad_mp3lib.c mp3lib/sr1.c SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32) += mp3lib/decode_i586.c SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOW) += mp3lib/dct36_3dnow.c \ mp3lib/dct64_3dnow.c -SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOWEX) += mp3lib/dct36_k7.c \ +SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOWEXT) += mp3lib/dct36_k7.c \ mp3lib/dct64_k7.c SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_MMX) += mp3lib/dct64_mmx.c SRCS_COMMON-$(MP3LIB)-$(HAVE_ALTIVEC) += mp3lib/dct64_altivec.c @@ -852,7 +852,7 @@ version.h: ###### dependency declarations / specific CFLAGS ###### codec-cfg.o: codecs.conf.h -mencoder.o mplayer.o vobsub.o gui/win32/gui.o libmpdemux/muxer_avi.o osdep/mplayer-rc.o stream/network.o stream/stream_cddb.o: version.h +mpcommon.o vobsub.o gui/win32/gui.o libmpdemux/muxer_avi.o osdep/mplayer-rc.o stream/network.o stream/stream_cddb.o: version.h $(DEPS): help_mp.h libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\" $(CFLAGS_LIBDVDCSS) @@ -19,7 +19,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef MPLAYER_AV_OPTS_H +#define MPLAYER_AV_OPTS_H + /** * Parses str and sets AVOptions in v accordingly. */ int parse_avopts(void *v, char *str); + +#endif /* MPLAYER_AV_OPTS_H */ @@ -2617,12 +2617,12 @@ EOF echores "$_iwmmxt" fi -_cpuexts_all='ALTIVEC BSWAP MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP IWMMXT MMI VIS MVI' +_cpuexts_all='ALTIVEC BSWAP MMX MMX2 3DNOW 3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP IWMMXT MMI VIS MVI' test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts" test "$_mmx" = yes && _cpuexts="MMX $_cpuexts" test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts" test "$_3dnow" = yes && _cpuexts="3DNOW $_cpuexts" -test "$_3dnowext" = yes && _cpuexts="3DNOWEX $_cpuexts" +test "$_3dnowext" = yes && _cpuexts="3DNOWEXT $_cpuexts" test "$_sse" = yes && _cpuexts="SSE $_cpuexts" test "$_sse2" = yes && _cpuexts="SSE2 $_cpuexts" test "$_ssse3" = yes && _cpuexts="SSSE3 $_cpuexts" diff --git a/cpudetect.c b/cpudetect.c index 9756dfb454..fee0c8fc1f 100644 --- a/cpudetect.c +++ b/cpudetect.c @@ -232,7 +232,7 @@ void GetCpuCaps( CpuCaps *caps) if(caps->has3DNow) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNow supported but disabled\n"); caps->has3DNow=0; #endif -#if !HAVE_3DNOWEX +#if !HAVE_3DNOWEXT if(caps->has3DNowExt) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNowExt supported but disabled\n"); caps->has3DNowExt=0; #endif diff --git a/input/lirc.c b/input/lirc.c index fec56f4828..4012d5b340 100644 --- a/input/lirc.c +++ b/input/lirc.c @@ -76,7 +76,7 @@ int mp_input_lirc_read(int fd,char* dest, int s) { return w; } - // Nothing in the buffer, pool the lirc fd + // Nothing in the buffer, poll the lirc fd FD_ZERO(&fds); FD_SET(fd,&fds); memset(&tv,0,sizeof(tv)); diff --git a/liba52/imdct.c b/liba52/imdct.c index 9ad36249d6..c6253b672d 100644 --- a/liba52/imdct.c +++ b/liba52/imdct.c @@ -53,8 +53,8 @@ void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias); #ifdef RUNTIME_CPUDETECT -#undef HAVE_3DNOWEX -#define HAVE_3DNOWEX 0 +#undef HAVE_3DNOWEXT +#define HAVE_3DNOWEXT 0 #endif typedef struct complex_s { @@ -720,11 +720,11 @@ const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = {{ 0x00000000 const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = {{ 0x80000000UL, 0x00000000UL }}; const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 }; -#undef HAVE_3DNOWEX -#define HAVE_3DNOWEX 0 +#undef HAVE_3DNOWEXT +#define HAVE_3DNOWEXT 0 #include "imdct_3dnow.h" -#undef HAVE_3DNOWEX -#define HAVE_3DNOWEX 1 +#undef HAVE_3DNOWEXT +#define HAVE_3DNOWEXT 1 #include "imdct_3dnow.h" void diff --git a/liba52/imdct_3dnow.h b/liba52/imdct_3dnow.h index eeab33b27c..048aa7baa7 100644 --- a/liba52/imdct_3dnow.h +++ b/liba52/imdct_3dnow.h @@ -26,7 +26,7 @@ #undef FFT_ASMB16_3DNOW #undef FFT_128P_3DNOW -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT #define FFT_4_3DNOW fft_4_3dnowex #define FFT_8_3DNOW fft_8_3dnowex #define FFT_ASMB_3DNOW fft_asmb_3dnowex @@ -52,7 +52,7 @@ static void FFT_4_3DNOW(complex_t *x) "pxor %3, %%mm1\n\t" /* -mm1.re | mm1.im */ "pfadd %%mm1, %%mm3\n\t" /* vi.im = x[3].re - x[1].re; */ "movq %%mm3, %%mm4\n\t" /* vi.re =-x[3].im + x[1].im; mm4 = vi */ -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd %%mm4, %%mm4\n\t" #else "punpckldq %%mm4, %%mm5\n\t" @@ -129,7 +129,7 @@ static void FFT_8_3DNOW(complex_t *x) "movq (%1), %%mm1\n\t" "movq 16(%1), %%mm4\n\t" "movq %%mm1, %%mm2\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd %%mm3, %%mm3\n\t" #else "punpckldq %%mm3, %%mm6\n\t" @@ -160,7 +160,7 @@ static void FFT_8_3DNOW(complex_t *x) "movq %2, %%mm1\n\t" "movq 56(%3), %%mm3\n\t" "pfsub 40(%3), %%mm0\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd %%mm1, %%mm1\n\t" #else "punpckldq %%mm1, %%mm2\n\t" @@ -168,7 +168,7 @@ static void FFT_8_3DNOW(complex_t *x) #endif "pxor %%mm7, %%mm1\n\t" "pfadd %%mm1, %%mm0\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd %%mm3, %%mm3\n\t" #else "punpckldq %%mm3, %%mm2\n\t" @@ -182,7 +182,7 @@ static void FFT_8_3DNOW(complex_t *x) "pfmul %4, %%mm0\n\t" "movq 40(%3), %%mm5\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd %%mm5, %%mm5\n\t" #else "punpckldq %%mm5, %%mm1\n\t" @@ -205,7 +205,7 @@ static void FFT_8_3DNOW(complex_t *x) /* x[3] x[7] */ __asm__ volatile( "movq %1, %%mm0\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd %3, %%mm1\n\t" #else "movq %3, %%mm1\n\t" @@ -218,7 +218,7 @@ static void FFT_8_3DNOW(complex_t *x) "movq 56(%4), %%mm3\n\t" "pxor %%mm7, %%mm3\n\t" "pfadd %%mm3, %%mm2\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd %%mm2, %%mm2\n\t" #else "punpckldq %%mm2, %%mm5\n\t" @@ -331,7 +331,7 @@ static void FFT_128P_3DNOW(complex_t *a) } static void -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT imdct_do_512_3dnowex #else imdct_do_512_3dnow @@ -371,14 +371,14 @@ imdct_do_512_3dnow "punpckldq %4, %%mm1\n\t" /* mm1 = xcos[j] | xsin[j] */ "movq %%mm0, %%mm2\n\t" "pfmul %%mm1, %%mm0\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd %%mm1, %%mm1\n\t" #else "punpckldq %%mm1, %%mm5\n\t" "punpckhdq %%mm5, %%mm1\n\t" #endif "pfmul %%mm1, %%mm2\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pfpnacc %%mm2, %%mm0\n\t" #else "pxor %%mm7, %%mm0\n\t" @@ -445,7 +445,7 @@ imdct_do_512_3dnow __asm__ volatile ( "movq %1, %%mm0\n\t" /* ac3_buf[i].re | ac3_buf[i].im */ "movq %%mm0, %%mm1\n\t" /* ac3_buf[i].re | ac3_buf[i].im */ -#if !HAVE_3DNOWEX +#if !HAVE_3DNOWEXT "punpckldq %%mm1, %%mm2\n\t" "punpckhdq %%mm2, %%mm1\n\t" #else @@ -455,7 +455,7 @@ imdct_do_512_3dnow "punpckldq %2, %%mm3\n\t" /* ac3_xsin[i] | ac3_xcos[i] */ "pfmul %%mm3, %%mm0\n\t" "pfmul %%mm3, %%mm1\n\t" -#if !HAVE_3DNOWEX +#if !HAVE_3DNOWEXT "pxor %%mm7, %%mm0\n\t" "pfacc %%mm1, %%mm0\n\t" "punpckldq %%mm0, %%mm1\n\t" @@ -543,7 +543,7 @@ imdct_do_512_3dnow "movd (%1), %%mm1\n\t" "punpckldq (%2), %%mm0\n\t" "punpckldq 508(%2), %%mm1\n\t" -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT "pswapd (%3), %%mm3\n\t" "pswapd -512(%3), %%mm4\n\t" #else diff --git a/liba52/liba52_changes.diff b/liba52/liba52_changes.diff index e5008a77cc..9840a05f02 100644 --- a/liba52/liba52_changes.diff +++ b/liba52/liba52_changes.diff @@ -1412,7 +1412,7 @@ +void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias); + +#ifdef RUNTIME_CPUDETECT -+#undef HAVE_3DNOWEX ++#undef HAVE_3DNOWEXT +#endif typedef struct complex_s { @@ -1862,9 +1862,9 @@ +const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = {{ 0x80000000UL, 0x00000000UL }}; +const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 }; + -+#undef HAVE_3DNOWEX ++#undef HAVE_3DNOWEXT +#include "imdct_3dnow.h" -+#define HAVE_3DNOWEX ++#define HAVE_3DNOWEXT +#include "imdct_3dnow.h" + +void diff --git a/liba52/srfftp_3dnow.h b/liba52/srfftp_3dnow.h index 1d66c5b89c..7d05d9e09f 100644 --- a/liba52/srfftp_3dnow.h +++ b/liba52/srfftp_3dnow.h @@ -46,7 +46,7 @@ typedef struct "m"(x_minus_plus_3dnow)\ :"memory"); -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT #define PSWAP_MM(mm_base,mm_hlp) "pswapd "mm_base","mm_base"\n\t" #else #define PSWAP_MM(mm_base,mm_hlp)\ @@ -54,7 +54,7 @@ typedef struct "psrlq $32, "mm_base"\n\t"\ "punpckldq "mm_hlp","mm_base"\n\t" #endif -#if HAVE_3DNOWEX +#if HAVE_3DNOWEXT #define PFNACC_MM(mm_base,mm_hlp) "pfnacc "mm_base","mm_base"\n\t" #else #define PFNACC_MM(mm_base,mm_hlp)\ diff --git a/libaf/af_resample.c b/libaf/af_resample.c index 0953217c4c..2536c0706d 100644 --- a/libaf/af_resample.c +++ b/libaf/af_resample.c @@ -25,6 +25,7 @@ #include <inttypes.h> #include "libavutil/common.h" +#include "libavutil/mathematics.h" #include "af.h" #include "dsp.h" diff --git a/libmpcodecs/vf_fspp.c b/libmpcodecs/vf_fspp.c index 7c42819d20..5ba6188d15 100644 --- a/libmpcodecs/vf_fspp.c +++ b/libmpcodecs/vf_fspp.c @@ -43,6 +43,7 @@ #include "mp_msg.h" #include "cpudetect.h" +#include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/mem.h" #include "libavcodec/avcodec.h" @@ -57,6 +58,9 @@ #include "vf.h" #include "libvo/fastmemcpy.h" +#undef free +#undef malloc + //===========================================================================// #define BLOCKSZ 12 diff --git a/libmpcodecs/vf_mcdeint.c b/libmpcodecs/vf_mcdeint.c index f1b816d8ba..6983aa5163 100644 --- a/libmpcodecs/vf_mcdeint.c +++ b/libmpcodecs/vf_mcdeint.c @@ -56,10 +56,15 @@ Known Issues: #include "mp_msg.h" #include "cpudetect.h" +#include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavcodec/avcodec.h" #include "libavcodec/dsputil.h" +#undef fprintf +#undef free +#undef malloc + #ifdef HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c index 219fe920f1..c910595c4a 100644 --- a/libmpcodecs/vf_pp.c +++ b/libmpcodecs/vf_pp.c @@ -15,6 +15,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" +#include "libavutil/internal.h" #include "libpostproc/postprocess.h" #ifdef CONFIG_LIBPOSTPROC_A @@ -22,6 +23,8 @@ #include "libpostproc/postprocess_internal.h" #endif +#undef malloc + struct vf_priv_s { int pp; pp_mode_t *ppMode[PP_QUALITY_MAX+1]; diff --git a/libmpcodecs/vf_spp.c b/libmpcodecs/vf_spp.c index 50969c13fb..aa18534966 100644 --- a/libmpcodecs/vf_spp.c +++ b/libmpcodecs/vf_spp.c @@ -37,10 +37,15 @@ #include "mp_msg.h" #include "cpudetect.h" +#include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavcodec/avcodec.h" #include "libavcodec/dsputil.h" +#undef fprintf +#undef free +#undef malloc + #ifdef HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index 5b79fea761..99be2a4f27 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -139,11 +139,11 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; //plain C versions #undef HAVE_MMX #undef HAVE_MMX2 -#undef HAVE_3DNOW +#undef HAVE_AMD3DNOW #undef HAVE_SSE2 #define HAVE_MMX 0 #define HAVE_MMX2 0 -#define HAVE_3DNOW 0 +#define HAVE_AMD3DNOW 0 #define HAVE_SSE2 0 #define RENAME(a) a ## _C #include "rgb2rgb_template.c" @@ -167,9 +167,9 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; //3DNOW versions #undef RENAME #undef HAVE_MMX2 -#undef HAVE_3DNOW +#undef HAVE_AMD3DNOW #define HAVE_MMX2 0 -#define HAVE_3DNOW 1 +#define HAVE_AMD3DNOW 1 #define RENAME(a) a ## _3DNOW #include "rgb2rgb_template.c" @@ -183,7 +183,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL; */ void sws_rgb2rgb_init(int flags){ -#if (HAVE_MMX2 || HAVE_3DNOW || HAVE_MMX) && CONFIG_GPL +#if (HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX) && CONFIG_GPL if (flags & SWS_CPU_CAPS_MMX2) rgb2rgb_init_MMX2(); else if (flags & SWS_CPU_CAPS_3DNOW) @@ -191,7 +191,7 @@ void sws_rgb2rgb_init(int flags){ else if (flags & SWS_CPU_CAPS_MMX) rgb2rgb_init_MMX(); else -#endif /* HAVE_MMX2 || HAVE_3DNOW || HAVE_MMX */ +#endif /* HAVE_MMX2 || HAVE_AMD3DNOW || HAVE_MMX */ rgb2rgb_init_C(); } diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index b988ca0465..f8915e8df2 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -43,7 +43,7 @@ #define MMREG_SIZE 8 #endif -#if HAVE_3DNOW +#if HAVE_AMD3DNOW #define PREFETCH "prefetch" #define PREFETCHW "prefetchw" #define PAVGB "pavgusb" @@ -56,7 +56,7 @@ #define PREFETCHW " # nop" #endif -#if HAVE_3DNOW +#if HAVE_AMD3DNOW /* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */ #define EMMS "femms" #else @@ -1914,7 +1914,7 @@ static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, long srcWi dst+= dstStride; for (y=1; y<srcHeight; y++){ -#if HAVE_MMX2 || HAVE_3DNOW +#if HAVE_MMX2 || HAVE_AMD3DNOW const long mmxSize= srcWidth&~15; __asm__ volatile( "mov %4, %%"REG_a" \n\t" @@ -2229,7 +2229,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ "1: \n\t" PREFETCH" 64(%0, %%"REG_d") \n\t" PREFETCH" 64(%1, %%"REG_d") \n\t" -#if HAVE_MMX2 || HAVE_3DNOW +#if HAVE_MMX2 || HAVE_AMD3DNOW "movq (%0, %%"REG_d"), %%mm0 \n\t" "movq (%1, %%"REG_d"), %%mm1 \n\t" "movq 6(%0, %%"REG_d"), %%mm2 \n\t" @@ -2290,7 +2290,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ "packssdw %%mm1, %%mm0 \n\t" // V1 V0 U1 U0 "psraw $7, %%mm0 \n\t" -#if HAVE_MMX2 || HAVE_3DNOW +#if HAVE_MMX2 || HAVE_AMD3DNOW "movq 12(%0, %%"REG_d"), %%mm4 \n\t" "movq 12(%1, %%"REG_d"), %%mm1 \n\t" "movq 18(%0, %%"REG_d"), %%mm2 \n\t" diff --git a/libswscale/swscale.c b/libswscale/swscale.c index a22bf64b71..88ac39757e 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -46,7 +46,7 @@ tested special converters (most are tested actually, but I did not write it down YVU9 -> YV12 untested special converters - YV12/I420 -> BGR15/BGR24/BGR32 (it is the yuv2rgb stuff, so it should be ok) + YV12/I420 -> BGR15/BGR24/BGR32 (it is the yuv2rgb stuff, so it should be OK) YV12/I420 -> YV12/I420 YUY2/BGR15/BGR24/BGR32/RGB24/RGB32 -> same format BGR24 -> BGR32 & RGB24 -> RGB32 @@ -83,15 +83,15 @@ unsigned swscale_version(void) #undef PAVGB //#undef HAVE_MMX2 -//#define HAVE_3DNOW +//#define HAVE_AMD3DNOW //#undef HAVE_MMX //#undef ARCH_X86 //#define WORDS_BIGENDIAN #define DITHER1XBPP -#define FAST_BGR2YV12 // use 7 bit coeffs instead of 15bit +#define FAST_BGR2YV12 // use 7 bit coefficients instead of 15 bit -#define RET 0xC3 //near return opcode for X86 +#define RET 0xC3 //near return opcode for x86 #ifdef M_PI #define PI M_PI @@ -194,10 +194,10 @@ Special versions: fast Y 1:1 scaling (no interpolation in y direction) TODO more intelligent misalignment avoidance for the horizontal scaler write special vertical cubic upscale version -Optimize C code (yv12 / minmax) -add support for packed pixel yuv input & output +optimize C code (YV12 / minmax) +add support for packed pixel YUV input & output add support for Y8 output -optimize bgr24 & bgr32 +optimize BGR24 & BGR32 add BGR4 output support write special BGR->BGR scaler */ @@ -257,7 +257,7 @@ DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toUV[2][4]) = { DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toUVOffset)= 0x0040400000404000ULL; -#endif /* ARCH_X86 */ +#endif /* ARCH_X86 && CONFIG_GPL */ // clipping helper table for C implementations: static unsigned char clip_table[768]; @@ -471,7 +471,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW) { - //FIXME Optimize (just quickly writen not opti..) + //FIXME Optimize (just quickly written not optimized..) int i; for (i=0; i<dstW; i++) { @@ -504,7 +504,7 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, uint8_t *dest, uint8_t *uDest, int dstW, int chrDstW, int dstFormat) { - //FIXME Optimize (just quickly writen not opti..) + //FIXME Optimize (just quickly written not optimized..) int i; for (i=0; i<dstW; i++) { @@ -653,7 +653,7 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil } #define YSCALE_YUV_2_RGBX_C(type) \ - YSCALE_YUV_2_PACKEDX_C(type) /* FIXME fix tables so that cliping is not needed and then use _NOCLIP*/\ + YSCALE_YUV_2_PACKEDX_C(type) /* FIXME fix tables so that clipping is not needed and then use _NOCLIP*/\ r = (type *)c->table_rV[V]; \ g = (type *)(c->table_gU[U] + c->table_gV[V]); \ b = (type *)c->table_bU[U]; \ @@ -953,7 +953,7 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t * } } -//Note: we have C, X86, MMX, MMX2, 3DNOW version therse no 3DNOW+MMX2 one +//Note: we have C, X86, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one //Plain C versions #if !HAVE_MMX || defined (RUNTIME_CPUDETECT) || !CONFIG_GPL #define COMPILE_C @@ -961,13 +961,14 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t * #if ARCH_PPC #if (HAVE_ALTIVEC || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL +#undef COMPILE_C #define COMPILE_ALTIVEC -#endif //HAVE_ALTIVEC +#endif #endif //ARCH_PPC #if ARCH_X86 -#if ((HAVE_MMX && !HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL +#if ((HAVE_MMX && !HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL #define COMPILE_MMX #endif @@ -975,18 +976,18 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t * #define COMPILE_MMX2 #endif -#if ((HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL +#if ((HAVE_AMD3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL #define COMPILE_3DNOW #endif -#endif //ARCH_X86 || ARCH_X86_64 +#endif //ARCH_X86 #undef HAVE_MMX #undef HAVE_MMX2 -#undef HAVE_3DNOW +#undef HAVE_AMD3DNOW #undef HAVE_ALTIVEC #define HAVE_MMX 0 #define HAVE_MMX2 0 -#define HAVE_3DNOW 0 +#define HAVE_AMD3DNOW 0 #define HAVE_ALTIVEC 0 #ifdef COMPILE_C @@ -1004,12 +1005,12 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t * #if ARCH_X86 -//X86 versions +//x86 versions /* #undef RENAME #undef HAVE_MMX #undef HAVE_MMX2 -#undef HAVE_3DNOW +#undef HAVE_AMD3DNOW #define ARCH_X86 #define RENAME(a) a ## _X86 #include "swscale_template.c" @@ -1019,10 +1020,10 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t * #undef RENAME #undef HAVE_MMX #undef HAVE_MMX2 -#undef HAVE_3DNOW +#undef HAVE_AMD3DNOW #define HAVE_MMX 1 #define HAVE_MMX2 0 -#define HAVE_3DNOW 0 +#define HAVE_AMD3DNOW 0 #define RENAME(a) a ## _MMX #include "swscale_template.c" #endif @@ -1032,10 +1033,10 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t * #undef RENAME #undef HAVE_MMX #undef HAVE_MMX2 -#undef HAVE_3DNOW +#undef HAVE_AMD3DNOW #define HAVE_MMX 1 #define HAVE_MMX2 1 -#define HAVE_3DNOW 0 +#define HAVE_AMD3DNOW 0 #define RENAME(a) a ## _MMX2 #include "swscale_template.c" #endif @@ -1045,17 +1046,17 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t * #undef RENAME #undef HAVE_MMX #undef HAVE_MMX2 -#undef HAVE_3DNOW +#undef HAVE_AMD3DNOW #define HAVE_MMX 1 #define HAVE_MMX2 0 -#define HAVE_3DNOW 1 +#define HAVE_AMD3DNOW 1 #define RENAME(a) a ## _3DNow #include "swscale_template.c" #endif -#endif //ARCH_X86 || ARCH_X86_64 +#endif //ARCH_X86 -// minor note: the HAVE_xyz is messed up after that line so don't use it +// minor note: the HAVE_xyz are messed up after this line so don't use them static double getSplineCoeff(double a, double b, double c, double d, double dist) { @@ -1085,7 +1086,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF __asm__ volatile("emms\n\t"::: "memory"); //FIXME this should not be required but it IS (even for non-MMX versions) #endif - // Note the +1 is for the MMXscaler which reads over the end + // NOTE: the +1 is for the MMX scaler which reads over the end *filterPos = av_malloc((dstW+1)*sizeof(int16_t)); if (FFABS(xInc - 0x10000) <10) // unscaled @@ -1134,7 +1135,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF int j; (*filterPos)[i]= xx; - //Bilinear upscale / linear interpolate / Area averaging + //bilinear upscale / linear interpolate / area averaging for (j=0; j<filterSize; j++) { int64_t coeff= fone - FFABS((xx<<16) - xDstInSrc)*(fone>>16); @@ -1315,7 +1316,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF /* preserve monotonicity because the core can't handle the filter otherwise */ if (i<dstW-1 && (*filterPos)[i] >= (*filterPos)[i+1]) break; - // Move filter coeffs left + // move filter coefficients left for (k=1; k<filter2Size; k++) filter2[i*filter2Size + k - 1]= filter2[i*filter2Size + k]; filter2[i*filter2Size + k - 1]= 0; @@ -1341,10 +1342,10 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF if (minFilterSize < 5) filterAlign = 4; - // we really don't want to waste our time - // doing useless computation, so fall-back on - // the scalar C code for very small filter. - // vectorizing is worth it only if you have + // We really don't want to waste our time + // doing useless computation, so fall back on + // the scalar C code for very small filters. + // Vectorizing is worth it only if you have a // decent-sized vector. if (minFilterSize < 3) filterAlign = 1; @@ -1381,7 +1382,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF } - //FIXME try to align filterpos if possible + //FIXME try to align filterPos if possible //fix borders for (i=0; i<dstW; i++) @@ -1389,7 +1390,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF int j; if ((*filterPos)[i] < 0) { - // Move filter coeffs left to compensate for filterPos + // move filter coefficients left to compensate for filterPos for (j=1; j<filterSize; j++) { int left= FFMAX(j + (*filterPos)[i], 0); @@ -1402,7 +1403,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF if ((*filterPos)[i] + filterSize > srcW) { int shift= (*filterPos)[i] + filterSize - srcW; - // Move filter coeffs right to compensate for filterPos + // move filter coefficients right to compensate for filterPos for (j=filterSize-2; j>=0; j--) { int right= FFMIN(j + shift, filterSize-1); @@ -1413,11 +1414,11 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF } } - // Note the +1 is for the MMXscaler which reads over the end + // Note the +1 is for the MMX scaler which reads over the end /* align at 16 for AltiVec (needed by hScale_altivec_real) */ *outFilter= av_mallocz(*outFilterSize*(dstW+1)*sizeof(int16_t)); - /* Normalize & Store in outFilter */ + /* normalize & store in outFilter */ for (i=0; i<dstW; i++) { int j; @@ -1660,7 +1661,7 @@ static SwsFunc getSwsFunc(int flags){ |