diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-07 02:41:01 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-07 03:01:43 +0100 |
commit | 13b7781ec8d475513c1ee40a6e481763b728a71e (patch) | |
tree | 953bee0a6461e74085e45e1f7793de6f850534e5 /libswscale/x86/swscale_mmx.c | |
parent | ada8d485c0f77a4e79fac7f3f96031c4d0e6bc7a (diff) | |
parent | f2bd8a0786ded12c70d6877f16944b44ea731462 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
x86inc: use sse versions of common macros instead of sse2 when applicable
doc/APIchanges: add missing dates and hashes
lavf: don't return from void av_update_cur_dts()
Changelog: add more entries.
Changelog: update ffmpeg/avconv incompatibility list.
avconv: remove some redundant temporary variables.
avconv: fix broken indentation
avconv: move copy_initial_nonkeyframes to the options context.
avconv: use file:stream instead of file.stream in log messages.
doc/avconv: elaborate on basic functionality.
doc/avconv: -sample_fmts, not -help sample_fmts prints the sample formats
openssl: Only use CRYPTO_set_id_callback on OpenSSL < 1.0.0
Call avformat_network_init/deinit in the programs
Remove leftover includes of strings.h
avutil: Don't allow using strcasecmp/strncasecmp
Replace all usage of strcasecmp/strncasecmp
avstring: Add locale independent implementations of strcasecmp/strncasecmp
avstring: Add locale independent implementations of toupper/tolower
cosmetics: insert some spaces in explicit enum value assignments
move 8SVX audio codecs to the audio codec list part on the next bump
...
Conflicts:
avprobe.c
doc/APIchanges
ffplay.c
ffserver.c
libavcodec/avcodec.h
libavdevice/bktr.c
libavdevice/v4l.c
libavdevice/v4l2.c
libavformat/matroskaenc.c
libavformat/wtv.c
libavutil/avstring.c
libavutil/avstring.h
libavutil/avutil.h
libswscale/x86/swscale_template.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/x86/swscale_mmx.c')
-rw-r--r-- | libswscale/x86/swscale_mmx.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale_mmx.c index c16be83f13..8869274dd4 100644 --- a/libswscale/x86/swscale_mmx.c +++ b/libswscale/x86/swscale_mmx.c @@ -289,6 +289,22 @@ VSCALEX_FUNCS(sse4, sse4); VSCALEX_FUNC(16, sse4); VSCALEX_FUNCS(avx, 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) +#define VSCALE_FUNCS(opt1, opt2) \ + VSCALE_FUNC(8, opt1); \ + VSCALE_FUNC(9, opt2); \ + VSCALE_FUNC(10, opt2); \ + VSCALE_FUNC(16, opt1) + +#if ARCH_X86_32 +VSCALE_FUNCS(mmx, mmx2); +#endif +VSCALE_FUNCS(sse2, sse2); +VSCALE_FUNC(16, sse4); +VSCALE_FUNCS(avx, avx); + void ff_sws_init_swScale_mmx(SwsContext *c) { int cpu_flags = av_get_cpu_flags(); @@ -336,11 +352,19 @@ switch(c->dstBpc){ \ case 9: if (!isBE(c->dstFormat) && opt2chk) /*vscalefn = ff_yuv2planeX_9_ ## opt2;*/ break; \ default: /*vscalefn = ff_yuv2planeX_8_ ## opt1;*/ break; \ } +#define ASSIGN_VSCALE_FUNC(vscalefn, opt1, opt2, opt2chk) \ + switch(c->dstBpc){ \ + case 16: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2plane1_16_ ## opt1; break; \ + case 10: if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2plane1_10_ ## opt2; break; \ + case 9: if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2plane1_9_ ## opt2; break; \ + default: vscalefn = ff_yuv2plane1_8_ ## opt1; break; \ + } #if ARCH_X86_32 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_VSCALEX_FUNC(c->yuv2planeX, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMX2,); + ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMX2); } #endif #define ASSIGN_SSE_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \ @@ -355,6 +379,7 @@ switch(c->dstBpc){ \ ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse2, sse2); ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse2, sse2); ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse2, sse2, 1,); + ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2, sse2, 1); } if (cpu_flags & AV_CPU_FLAG_SSSE3) { ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, ssse3, ssse3); @@ -366,10 +391,13 @@ switch(c->dstBpc){ \ ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse4, ssse3); ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse4, sse4, 1, if (!isBE(c->dstFormat)) c->yuv2planeX = ff_yuv2planeX_16_sse4); + if (c->dstBpc == 16 && !isBE(c->dstFormat)) + c->yuv2plane1 = ff_yuv2plane1_16_sse4; } if (cpu_flags & AV_CPU_FLAG_AVX) { ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx, avx, 1,); + ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx, avx, 1); } #endif } |