summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-08-02 23:18:08 +0100
committerMans Rullgard <mans@mansr.com>2012-08-04 00:59:14 +0100
commite6cd698955c87b78534a5a897d595d7315103689 (patch)
treef97f2c22915d66796d67794e266d9b2c077fa554
parent9829a81bcd3e9ef26c4bbc2959bfb65159dbd314 (diff)
downloadffmpeg-e6cd698955c87b78534a5a897d595d7315103689.tar.gz
ARMv6: vp8: fix stack allocation with Apple's assembler
In the GNU assembler, a relational expression, bizarrely, has the value -1 if true, whereas in Apple's it is +1. This patch makes sure the correct expression is used in both cases. Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r--libavcodec/arm/vp8dsp_armv6.S8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/arm/vp8dsp_armv6.S b/libavcodec/arm/vp8dsp_armv6.S
index a26a2a9813..40be926f9f 100644
--- a/libavcodec/arm/vp8dsp_armv6.S
+++ b/libavcodec/arm/vp8dsp_armv6.S
@@ -1226,7 +1226,13 @@ vp8_mc_1 bilin, 8, v
vp8_mc_1 bilin, 4, h
vp8_mc_1 bilin, 4, v
-#define TMPSIZE \size * (8 - 8*(\size > 4) + \ytaps - 1)
+/* True relational expressions have the value -1 in the GNU assembler,
+ +1 in Apple's. */
+#ifdef __APPLE__
+# define TMPSIZE \size * (8 + 8*(\size > 4) + \ytaps - 1)
+#else
+# define TMPSIZE \size * (8 - 8*(\size > 4) + \ytaps - 1)
+#endif
.macro vp8_mc_hv name, size, h, v, ytaps
function ff_put_vp8_\name\size\()_\h\v\()_armv6, export=1