diff options
Diffstat (limited to 'ffmpeg/libswscale/x86/swscale.c')
| -rw-r--r-- | ffmpeg/libswscale/x86/swscale.c | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/ffmpeg/libswscale/x86/swscale.c b/ffmpeg/libswscale/x86/swscale.c index 2f67b1b..2f7e4f7 100644 --- a/ffmpeg/libswscale/x86/swscale.c +++ b/ffmpeg/libswscale/x86/swscale.c @@ -58,15 +58,10 @@ DECLARE_ALIGNED(8, const uint64_t, ff_M24A) = 0x00FF0000FF0000FFLL; DECLARE_ALIGNED(8, const uint64_t, ff_M24B) = 0xFF0000FF0000FF00LL; DECLARE_ALIGNED(8, const uint64_t, ff_M24C) = 0x0000FF0000FF0000LL; -#ifdef FAST_BGR2YV12 -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YCoeff) = 0x000000210041000DULL; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UCoeff) = 0x0000FFEEFFDC0038ULL; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr2VCoeff) = 0x00000038FFD2FFF8ULL; -#else DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YCoeff) = 0x000020E540830C8BULL; DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UCoeff) = 0x0000ED0FDAC23831ULL; DECLARE_ALIGNED(8, const uint64_t, ff_bgr2VCoeff) = 0x00003831D0E6F6EAULL; -#endif /* FAST_BGR2YV12 */ + DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YOffset) = 0x1010101010101010ULL; DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UVOffset) = 0x8080808080808080ULL; DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL; @@ -76,7 +71,7 @@ DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL; #if HAVE_MMX_INLINE #undef RENAME #define COMPILE_TEMPLATE_MMXEXT 0 -#define RENAME(a) a ## _MMX +#define RENAME(a) a ## _mmx #include "swscale_template.c" #endif @@ -85,7 +80,7 @@ DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL; #undef RENAME #undef COMPILE_TEMPLATE_MMXEXT #define COMPILE_TEMPLATE_MMXEXT 1 -#define RENAME(a) a ## _MMXEXT +#define RENAME(a) a ## _mmxext #include "swscale_template.c" #endif @@ -211,7 +206,7 @@ static void yuv2yuvX_sse3(const int16_t *filter, int filterSize, const uint8_t *dither, int offset) { if(((int)dest) & 15){ - return yuv2yuvX_MMXEXT(filter, filterSize, src, dest, dstW, dither, offset); + return yuv2yuvX_mmxext(filter, filterSize, src, dest, dstW, dither, offset); } if (offset) { __asm__ volatile("movq (%0), %%xmm3\n\t" @@ -279,7 +274,7 @@ static void yuv2yuvX_sse3(const int16_t *filter, int filterSize, #endif /* HAVE_INLINE_ASM */ #define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt) \ -extern void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( \ +void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( \ SwsContext *c, int16_t *data, \ int dstW, const uint8_t *src, \ const int16_t *filter, \ @@ -318,9 +313,9 @@ SCALE_FUNCS_SSE(ssse3); SCALE_FUNCS_SSE(sse4); #define VSCALEX_FUNC(size, opt) \ -extern void ff_yuv2planeX_ ## size ## _ ## opt(const int16_t *filter, int filterSize, \ - const int16_t **src, uint8_t *dest, int dstW, \ - const uint8_t *dither, int offset) +void ff_yuv2planeX_ ## size ## _ ## opt(const int16_t *filter, int filterSize, \ + const int16_t **src, uint8_t *dest, int dstW, \ + const uint8_t *dither, int offset) #define VSCALEX_FUNCS(opt) \ VSCALEX_FUNC(8, opt); \ VSCALEX_FUNC(9, opt); \ @@ -335,8 +330,8 @@ VSCALEX_FUNC(16, sse4); VSCALEX_FUNCS(avx); #define VSCALE_FUNC(size, opt) \ -extern void ff_yuv2plane1_ ## size ## _ ## opt(const int16_t *src, uint8_t *dst, int dstW, \ - const uint8_t *dither, int offset) +void ff_yuv2plane1_ ## size ## _ ## opt(const int16_t *src, uint8_t *dst, int dstW, \ + const uint8_t *dither, int offset) #define VSCALE_FUNCS(opt1, opt2) \ VSCALE_FUNC(8, opt1); \ VSCALE_FUNC(9, opt2); \ @@ -351,15 +346,15 @@ VSCALE_FUNC(16, sse4); VSCALE_FUNCS(avx, avx); #define INPUT_Y_FUNC(fmt, opt) \ -extern void ff_ ## fmt ## ToY_ ## opt(uint8_t *dst, const uint8_t *src, \ - const uint8_t *unused1, const uint8_t *unused2, \ - int w, uint32_t *unused) +void ff_ ## fmt ## ToY_ ## opt(uint8_t *dst, const uint8_t *src, \ + const uint8_t *unused1, const uint8_t *unused2, \ + int w, uint32_t *unused) #define INPUT_UV_FUNC(fmt, opt) \ -extern void ff_ ## fmt ## ToUV_ ## opt(uint8_t *dstU, uint8_t *dstV, \ - const uint8_t *unused0, \ - const uint8_t *src1, \ - const uint8_t *src2, \ - int w, uint32_t *unused) +void ff_ ## fmt ## ToUV_ ## opt(uint8_t *dstU, uint8_t *dstV, \ + const uint8_t *unused0, \ + const uint8_t *src1, \ + const uint8_t *src2, \ + int w, uint32_t *unused) #define INPUT_FUNC(fmt, opt) \ INPUT_Y_FUNC(fmt, opt); \ INPUT_UV_FUNC(fmt, opt) @@ -382,22 +377,22 @@ INPUT_FUNCS(sse2); INPUT_FUNCS(ssse3); INPUT_FUNCS(avx); -av_cold void ff_sws_init_swScale_mmx(SwsContext *c) +av_cold void ff_sws_init_swscale_x86(SwsContext *c) { int cpu_flags = av_get_cpu_flags(); -#if HAVE_INLINE_ASM +#if HAVE_MMX_INLINE if (cpu_flags & AV_CPU_FLAG_MMX) - sws_init_swScale_MMX(c); + sws_init_swscale_mmx(c); +#endif #if HAVE_MMXEXT_INLINE if (cpu_flags & AV_CPU_FLAG_MMXEXT) - sws_init_swScale_MMXEXT(c); + sws_init_swscale_mmxext(c); if (cpu_flags & AV_CPU_FLAG_SSE3){ if(c->use_mmx_vfilter && !(c->flags & SWS_ACCURATE_RND)) c->yuv2planeX = yuv2yuvX_sse3; } #endif -#endif /* HAVE_INLINE_ASM */ #define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt1, opt2) do { \ if (c->srcBpc == 8) { \ |
