summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-11 02:23:55 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-11 02:44:43 +0100
commit0e7fc3cafe838b32c3af73954acf9de2f9240ffd (patch)
treef0c534b98818c2712dbeed7f08b4ba831e0de23d /libswscale
parenta9bd29e15e8d4ab4afaba7c31ebc0063c1df2db9 (diff)
parent9472d37d8e137df1e78e973b8b0e0d5607a799d5 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits) rv34: frame-level multi-threading mpegvideo: claim ownership of referenced pictures aacsbr: prevent out of bounds memcpy(). ipmovie: fix pts for CODEC_ID_INTERPLAY_DPCM sierravmd: fix audio pts bethsoftvideo: Use bytestream2 functions to prevent buffer overreads. bmpenc: support for PIX_FMT_RGB444 swscale: fix crash in fast_bilinear code when compiled with -mred-zone. swscale: specify register type. rv34: use get_bits_left() avconv: reinitialize the filtergraph on resolution change. vsrc_buffer: error on changing frame parameters. avconv: fix -copyinkf. fate: Update file checksums after the mov muxer change in a78dbada55d6 movenc: Don't store a nonzero creation time if nothing was set by the caller bmpdec: support for rgb444 with bitfields compression rgb2rgb: allow conversion for <15 bpp doc: fix stray reference to FFmpeg v4l2: use C99 struct initializer v4l2: poll the file descriptor ... Conflicts: avconv.c libavcodec/aacsbr.c libavcodec/bethsoftvideo.c libavcodec/kmvc.c libavdevice/v4l2.c libavfilter/vsrc_buffer.c libswscale/swscale_unscaled.c libswscale/x86/input.asm tests/ref/acodec/alac tests/ref/acodec/pcm_s16be tests/ref/acodec/pcm_s24be tests/ref/acodec/pcm_s32be tests/ref/acodec/pcm_s8 tests/ref/lavf/mov tests/ref/vsynth1/dnxhd_1080i tests/ref/vsynth1/mpeg4 tests/ref/vsynth1/qtrle tests/ref/vsynth1/svq1 tests/ref/vsynth2/dnxhd_1080i tests/ref/vsynth2/mpeg4 tests/ref/vsynth2/qtrle tests/ref/vsynth2/svq1 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/x86/input.asm4
-rw-r--r--libswscale/x86/swscale_template.c50
2 files changed, 51 insertions, 3 deletions
diff --git a/libswscale/x86/input.asm b/libswscale/x86/input.asm
index af53dab7d6..0e54522ca7 100644
--- a/libswscale/x86/input.asm
+++ b/libswscale/x86/input.asm
@@ -135,7 +135,7 @@ cglobal %2ToY, 5, 5, %1, dst, unused0, unused1, src, w
%macro YUYV_TO_UV_FN 2-3
cglobal %2ToUV, 4, 5, %1, dstU, dstV, unused, src, w
%ifdef ARCH_X86_64
- movsxd wq, r5m
+ movsxd wq, dword r5m
%else ; x86-32
mov wq, r5m
%endif
@@ -190,7 +190,7 @@ cglobal %2ToUV, 4, 5, %1, dstU, dstV, unused, src, w
%macro NVXX_TO_UV_FN 2
cglobal %2ToUV, 4, 5, %1, dstU, dstV, unused, src, w
%ifdef ARCH_X86_64
- movsxd wq, r5m
+ movsxd wq, dword r5m
%else ; x86-32
mov wq, r5m
%endif
diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
index 79c63b7d47..e92d927440 100644
--- a/libswscale/x86/swscale_template.c
+++ b/libswscale/x86/swscale_template.c
@@ -1584,12 +1584,24 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
void *mmx2FilterCode= c->lumMmx2FilterCode;
int i;
#if defined(PIC)
- DECLARE_ALIGNED(8, uint64_t, ebxsave);
+ uint64_t ebxsave;
+#endif
+#if ARCH_X86_64
+ uint64_t retsave;
#endif
__asm__ volatile(
#if defined(PIC)
"mov %%"REG_b", %5 \n\t"
+#if ARCH_X86_64
+ "mov -8(%%rsp), %%"REG_a" \n\t"
+ "mov %%"REG_a", %6 \n\t"
+#endif
+#else
+#if ARCH_X86_64
+ "mov -8(%%rsp), %%"REG_a" \n\t"
+ "mov %%"REG_a", %5 \n\t"
+#endif
#endif
"pxor %%mm7, %%mm7 \n\t"
"mov %0, %%"REG_c" \n\t"
@@ -1631,12 +1643,24 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
#if defined(PIC)
"mov %5, %%"REG_b" \n\t"
+#if ARCH_X86_64
+ "mov %6, %%"REG_a" \n\t"
+ "mov %%"REG_a", -8(%%rsp) \n\t"
+#endif
+#else
+#if ARCH_X86_64
+ "mov %5, %%"REG_a" \n\t"
+ "mov %%"REG_a", -8(%%rsp) \n\t"
+#endif
#endif
:: "m" (src), "m" (dst), "m" (filter), "m" (filterPos),
"m" (mmx2FilterCode)
#if defined(PIC)
,"m" (ebxsave)
#endif
+#if ARCH_X86_64
+ ,"m"(retsave)
+#endif
: "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
#if !defined(PIC)
,"%"REG_b
@@ -1658,10 +1682,22 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
#if defined(PIC)
DECLARE_ALIGNED(8, uint64_t, ebxsave);
#endif
+#if ARCH_X86_64
+ DECLARE_ALIGNED(8, uint64_t, retsave);
+#endif
__asm__ volatile(
#if defined(PIC)
"mov %%"REG_b", %7 \n\t"
+#if ARCH_X86_64
+ "mov -8(%%rsp), %%"REG_a" \n\t"
+ "mov %%"REG_a", %8 \n\t"
+#endif
+#else
+#if ARCH_X86_64
+ "mov -8(%%rsp), %%"REG_a" \n\t"
+ "mov %%"REG_a", %7 \n\t"
+#endif
#endif
"pxor %%mm7, %%mm7 \n\t"
"mov %0, %%"REG_c" \n\t"
@@ -1691,12 +1727,24 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
#if defined(PIC)
"mov %7, %%"REG_b" \n\t"
+#if ARCH_X86_64
+ "mov %8, %%"REG_a" \n\t"
+ "mov %%"REG_a", -8(%%rsp) \n\t"
+#endif
+#else
+#if ARCH_X86_64
+ "mov %7, %%"REG_a" \n\t"
+ "mov %%"REG_a", -8(%%rsp) \n\t"
+#endif
#endif
:: "m" (src1), "m" (dst1), "m" (filter), "m" (filterPos),
"m" (mmx2FilterCode), "m" (src2), "m"(dst2)
#if defined(PIC)
,"m" (ebxsave)
#endif
+#if ARCH_X86_64
+ ,"m"(retsave)
+#endif
: "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
#if !defined(PIC)
,"%"REG_b