diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-04 22:39:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-04 23:51:43 +0200 |
commit | e776ee8f294984f7643a3c45db803c7266e1edfd (patch) | |
tree | a1fd00ab7a0760ec0f2848aed9dc3f79d889e816 /libswscale/x86 | |
parent | 88fc1438c693ffb7793aeb111d89775440491840 (diff) | |
parent | 8821ae649e61097ec57ca58472c3e4239c82913c (diff) | |
download | ffmpeg-e776ee8f294984f7643a3c45db803c7266e1edfd.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavr: fix handling of custom mix matrices
fate: force pix_fmt in lagarith-rgb32 test
fate: add tests for lagarith lossless video codec.
ARMv6: vp8: fix stack allocation with Apple's assembler
ARM: vp56: allow inline asm to build with clang
fft: 3dnow: fix register name typo in DECL_IMDCT macro
x86: dct32: port to cpuflags
x86: build: replace mmx2 by mmxext
Revert "wmapro: prevent division by zero when sample rate is unspecified"
wmapro: prevent division by zero when sample rate is unspecified
lagarith: fix color plane inversion for YUY2 output.
lagarith: pad RGB buffer by 1 byte.
dsputil: make add_hfyu_left_prediction_sse4() support unaligned src.
Conflicts:
doc/APIchanges
libavcodec/lagarith.c
libavfilter/x86/gradfun.c
libavutil/cpu.h
libavutil/version.h
libswscale/utils.c
libswscale/version.h
libswscale/x86/yuv2rgb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/x86')
-rw-r--r-- | libswscale/x86/rgb2rgb.c | 12 | ||||
-rw-r--r-- | libswscale/x86/rgb2rgb_template.c | 18 | ||||
-rw-r--r-- | libswscale/x86/swscale.c | 16 | ||||
-rw-r--r-- | libswscale/x86/swscale_template.c | 20 | ||||
-rw-r--r-- | libswscale/x86/yuv2rgb.c | 16 | ||||
-rw-r--r-- | libswscale/x86/yuv2rgb_template.c | 12 |
6 files changed, 47 insertions, 47 deletions
diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index cd46df719d..9e4938a81a 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -88,7 +88,7 @@ DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL; //Note: We have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW + MMX2 one. -#define COMPILE_TEMPLATE_MMX2 0 +#define COMPILE_TEMPLATE_MMXEXT 0 #define COMPILE_TEMPLATE_AMD3DNOW 0 #define COMPILE_TEMPLATE_SSE2 0 @@ -99,8 +99,8 @@ DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL; //MMX2 versions #undef RENAME -#undef COMPILE_TEMPLATE_MMX2 -#define COMPILE_TEMPLATE_MMX2 1 +#undef COMPILE_TEMPLATE_MMXEXT +#define COMPILE_TEMPLATE_MMXEXT 1 #define RENAME(a) a ## _MMX2 #include "rgb2rgb_template.c" @@ -113,10 +113,10 @@ DECLARE_ASM_CONST(8, uint64_t, mul16_mid) = 0x2080208020802080ULL; //3DNOW versions #undef RENAME -#undef COMPILE_TEMPLATE_MMX2 +#undef COMPILE_TEMPLATE_MMXEXT #undef COMPILE_TEMPLATE_SSE2 #undef COMPILE_TEMPLATE_AMD3DNOW -#define COMPILE_TEMPLATE_MMX2 0 +#define COMPILE_TEMPLATE_MMXEXT 0 #define COMPILE_TEMPLATE_SSE2 0 #define COMPILE_TEMPLATE_AMD3DNOW 1 #define RENAME(a) a ## _3DNOW @@ -140,7 +140,7 @@ av_cold void rgb2rgb_init_x86(void) rgb2rgb_init_MMX(); if (HAVE_AMD3DNOW && cpu_flags & AV_CPU_FLAG_3DNOW) rgb2rgb_init_3DNOW(); - if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) + if (HAVE_MMXEXT && cpu_flags & AV_CPU_FLAG_MMXEXT) rgb2rgb_init_MMX2(); if (HAVE_SSE && cpu_flags & AV_CPU_FLAG_SSE2) rgb2rgb_init_SSE2(); diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index bb97a0b4a1..594524d9ed 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -35,7 +35,7 @@ #if COMPILE_TEMPLATE_AMD3DNOW #define PREFETCH "prefetch" #define PAVGB "pavgusb" -#elif COMPILE_TEMPLATE_MMX2 +#elif COMPILE_TEMPLATE_MMXEXT #define PREFETCH "prefetchnta" #define PAVGB "pavgb" #else @@ -49,7 +49,7 @@ #define EMMS "emms" #endif -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT #define MOVNTQ "movntq" #define SFENCE "sfence" #else @@ -1136,7 +1136,7 @@ static inline void RENAME(shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, PREFETCH" 32(%1, %0) \n\t" "movq (%1, %0), %%mm0 \n\t" "movq 8(%1, %0), %%mm1 \n\t" -# if COMPILE_TEMPLATE_MMX2 +# if COMPILE_TEMPLATE_MMXEXT "pshufw $177, %%mm0, %%mm3 \n\t" "pshufw $177, %%mm1, %%mm5 \n\t" "pand %%mm7, %%mm0 \n\t" @@ -1500,7 +1500,7 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t } #endif /* !COMPILE_TEMPLATE_AMD3DNOW */ -#if COMPILE_TEMPLATE_MMX2 || COMPILE_TEMPLATE_AMD3DNOW +#if COMPILE_TEMPLATE_MMXEXT || COMPILE_TEMPLATE_AMD3DNOW static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, int srcWidth, int srcHeight, int srcStride, int dstStride) { int x,y; @@ -1590,7 +1590,7 @@ static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, int srcWid SFENCE" \n\t" :::"memory"); } -#endif /* COMPILE_TEMPLATE_MMX2 || COMPILE_TEMPLATE_AMD3DNOW */ +#endif /* COMPILE_TEMPLATE_MMXEXT || COMPILE_TEMPLATE_AMD3DNOW */ #if !COMPILE_TEMPLATE_AMD3DNOW /** @@ -1798,7 +1798,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 COMPILE_TEMPLATE_MMX2 || COMPILE_TEMPLATE_AMD3DNOW +#if COMPILE_TEMPLATE_MMXEXT || COMPILE_TEMPLATE_AMD3DNOW "movq (%0, %%"REG_d"), %%mm0 \n\t" "movq (%1, %%"REG_d"), %%mm1 \n\t" "movq 6(%0, %%"REG_d"), %%mm2 \n\t" @@ -1859,7 +1859,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 COMPILE_TEMPLATE_MMX2 || COMPILE_TEMPLATE_AMD3DNOW +#if COMPILE_TEMPLATE_MMXEXT || COMPILE_TEMPLATE_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" @@ -2580,9 +2580,9 @@ static inline void RENAME(rgb2rgb_init)(void) yuyvtoyuv422 = RENAME(yuyvtoyuv422); #endif /* !COMPILE_TEMPLATE_SSE2 */ -#if COMPILE_TEMPLATE_MMX2 || COMPILE_TEMPLATE_AMD3DNOW +#if COMPILE_TEMPLATE_MMXEXT || COMPILE_TEMPLATE_AMD3DNOW planar2x = RENAME(planar2x); -#endif /* COMPILE_TEMPLATE_MMX2 || COMPILE_TEMPLATE_AMD3DNOW */ +#endif /* COMPILE_TEMPLATE_MMXEXT || COMPILE_TEMPLATE_AMD3DNOW */ rgb24toyv12 = RENAME(rgb24toyv12); yuyvtoyuv420 = RENAME(yuyvtoyuv420); diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index eb33788168..132ec3e570 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -74,16 +74,16 @@ DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL; //MMX versions #if HAVE_MMX #undef RENAME -#define COMPILE_TEMPLATE_MMX2 0 +#define COMPILE_TEMPLATE_MMXEXT 0 #define RENAME(a) a ## _MMX #include "swscale_template.c" #endif //MMX2 versions -#if HAVE_MMX2 +#if HAVE_MMXEXT #undef RENAME -#undef COMPILE_TEMPLATE_MMX2 -#define COMPILE_TEMPLATE_MMX2 1 +#undef COMPILE_TEMPLATE_MMXEXT +#define COMPILE_TEMPLATE_MMXEXT 1 #define RENAME(a) a ## _MMX2 #include "swscale_template.c" #endif @@ -375,8 +375,8 @@ av_cold void ff_sws_init_swScale_mmx(SwsContext *c) #if HAVE_INLINE_ASM if (cpu_flags & AV_CPU_FLAG_MMX) sws_init_swScale_MMX(c); -#if HAVE_MMX2 - if (cpu_flags & AV_CPU_FLAG_MMX2) +#if HAVE_MMXEXT + if (cpu_flags & AV_CPU_FLAG_MMXEXT) sws_init_swScale_MMX2(c); if (cpu_flags & AV_CPU_FLAG_SSE3){ if(c->use_mmx_vfilter && !(c->flags & SWS_ACCURATE_RND)) @@ -439,7 +439,7 @@ switch(c->dstBpc){ \ if (cpu_flags & AV_CPU_FLAG_MMX) { ASSIGN_MMX_SCALE_FUNC(c->hyScale, c->hLumFilterSize, mmx, mmx); ASSIGN_MMX_SCALE_FUNC(c->hcScale, c->hChrFilterSize, mmx, mmx); - ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMX2); + ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMXEXT); switch (c->srcFormat) { case PIX_FMT_Y400A: @@ -471,7 +471,7 @@ switch(c->dstBpc){ \ break; } } - if (cpu_flags & AV_CPU_FLAG_MMX2) { + if (cpu_flags & AV_CPU_FLAG_MMXEXT) { ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmx2, , 1); } #endif diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index 245bfdeadd..370a0ebe1b 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -23,13 +23,13 @@ #undef MOVNTQ2 #undef PREFETCH -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT #define PREFETCH "prefetchnta" #else #define PREFETCH " # nop" #endif -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT #define REAL_MOVNTQ(a,b) "movntq " #a ", " #b " \n\t" #define MOVNTQ2 "movntq " #else @@ -38,7 +38,7 @@ #endif #define MOVNTQ(a,b) REAL_MOVNTQ(a,b) -#if !COMPILE_TEMPLATE_MMX2 +#if !COMPILE_TEMPLATE_MMXEXT static av_always_inline void dither_8to16(const uint8_t *srcDither, int rot) { @@ -641,7 +641,7 @@ static void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter, "cmp "#dstw", "#index" \n\t"\ " jb 1b \n\t" -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT #undef WRITEBGR24 #define WRITEBGR24(dst, dstw, index) WRITEBGR24MMX2(dst, dstw, index) #else @@ -1445,7 +1445,7 @@ static void RENAME(yuv2yuyv422_1)(SwsContext *c, const int16_t *buf0, } } -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc) @@ -1627,7 +1627,7 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2, dst2[i] = src2[srcW-1]*128; } } -#endif /* COMPILE_TEMPLATE_MMX2 */ +#endif /* COMPILE_TEMPLATE_MMXEXT */ static av_cold void RENAME(sws_init_swScale)(SwsContext *c) { @@ -1691,17 +1691,17 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c) if (c->srcBpc == 8 && c->dstBpc <= 14) { // Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one). -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT if (c->flags & SWS_FAST_BILINEAR && c->canMMX2BeUsed) { c->hyscale_fast = RENAME(hyscale_fast); c->hcscale_fast = RENAME(hcscale_fast); } else { -#endif /* COMPILE_TEMPLATE_MMX2 */ +#endif /* COMPILE_TEMPLATE_MMXEXT */ c->hyscale_fast = NULL; c->hcscale_fast = NULL; -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT } -#endif /* COMPILE_TEMPLATE_MMX2 */ +#endif /* COMPILE_TEMPLATE_MMXEXT */ } } diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c index 2a76716335..8cb7f1ae0d 100644 --- a/libswscale/x86/yuv2rgb.c +++ b/libswscale/x86/yuv2rgb.c @@ -52,20 +52,20 @@ DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL; //MMX versions #if HAVE_MMX #undef RENAME -#undef COMPILE_TEMPLATE_MMX2 -#define COMPILE_TEMPLATE_MMX2 0 +#undef COMPILE_TEMPLATE_MMXEXT +#define COMPILE_TEMPLATE_MMXEXT 0 #define RENAME(a) a ## _MMX #include "yuv2rgb_template.c" #endif /* HAVE_MMX */ //MMX2 versions -#if HAVE_MMX2 +#if HAVE_MMXEXT #undef RENAME -#undef COMPILE_TEMPLATE_MMX2 -#define COMPILE_TEMPLATE_MMX2 1 +#undef COMPILE_TEMPLATE_MMXEXT +#define COMPILE_TEMPLATE_MMXEXT 1 #define RENAME(a) a ## _MMX2 #include "yuv2rgb_template.c" -#endif /* HAVE_MMX2 */ +#endif /* HAVE_MMXEXT */ #endif /* HAVE_INLINE_ASM */ @@ -74,8 +74,8 @@ av_cold SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c) #if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); -#if HAVE_MMX2 - if (cpu_flags & AV_CPU_FLAG_MMX2) { +#if HAVE_MMXEXT + if (cpu_flags & AV_CPU_FLAG_MMXEXT) { switch (c->dstFormat) { case PIX_FMT_RGB24: return yuv420_rgb24_MMX2; case PIX_FMT_BGR24: return yuv420_bgr24_MMX2; diff --git a/libswscale/x86/yuv2rgb_template.c b/libswscale/x86/yuv2rgb_template.c index 624de14252..79e48fd7f0 100644 --- a/libswscale/x86/yuv2rgb_template.c +++ b/libswscale/x86/yuv2rgb_template.c @@ -25,7 +25,7 @@ #undef EMMS #undef SFENCE -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT #define MOVNTQ "movntq" #define SFENCE "sfence" #else @@ -181,7 +181,7 @@ "paddusb "GREEN_DITHER"(%4), %%mm2\n\t" \ "paddusb "RED_DITHER"(%4), %%mm1\n\t" \ -#if !COMPILE_TEMPLATE_MMX2 +#if !COMPILE_TEMPLATE_MMXEXT static inline int RENAME(yuv420_rgb15)(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, @@ -237,7 +237,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, const uint8_t *src[], YUV2RGB_OPERANDS YUV2RGB_ENDFUNC } -#endif /* !COMPILE_TEMPLATE_MMX2 */ +#endif /* !COMPILE_TEMPLATE_MMXEXT */ #define RGB_PACK24(blue, red)\ "packuswb %%mm3, %%mm0 \n" /* R0 R2 R4 R6 R1 R3 R5 R7 */\ @@ -254,7 +254,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, const uint8_t *src[], "punpckhwd %%mm6, %%mm5 \n" /* R4 G4 B4 R5 R6 G6 B6 R7 */\ RGB_PACK24_B -#if COMPILE_TEMPLATE_MMX2 +#if COMPILE_TEMPLATE_MMXEXT DECLARE_ASM_CONST(8, int16_t, mask1101[4]) = {-1,-1, 0,-1}; DECLARE_ASM_CONST(8, int16_t, mask0010[4]) = { 0, 0,-1, 0}; DECLARE_ASM_CONST(8, int16_t, mask0110[4]) = { 0,-1,-1, 0}; @@ -361,7 +361,7 @@ static inline int RENAME(yuv420_bgr24)(SwsContext *c, const uint8_t *src[], MOVNTQ " %%mm5, 16(%1)\n\t" \ MOVNTQ " %%mm"alpha", 24(%1)\n\t" \ -#if !COMPILE_TEMPLATE_MMX2 +#if !COMPILE_TEMPLATE_MMXEXT static inline int RENAME(yuv420_rgb32)(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, @@ -448,4 +448,4 @@ static inline int RENAME(yuva420_bgr32)(SwsContext *c, const uint8_t *src[], } #endif -#endif /* !COMPILE_TEMPLATE_MMX2 */ +#endif /* !COMPILE_TEMPLATE_MMXEXT */ |