Disable the VC-1 motion compensation NEON asm which is the only part
using that directive. The integrated assembler in the upcoming clang 3.5
does not support .dn/.qn without plans to change that. Too much effort
to implement it while it is rarely used.

http://llvm.org/bugs/show_bug.cgi?id=18199.
---
 configure                         | 6 ++++++
 libavcodec/arm/vc1dsp_init_neon.c | 4 ++++
 libavcodec/arm/vc1dsp_neon.S      | 4 ++++
 3 files changed, 14 insertions(+)

diff --git a/configure b/configure
index 9c6109e..a148b93 100755
--- a/configure
+++ b/configure
@@ -1467,6 +1467,7 @@ SYSTEM_FUNCS="
 "
 
 TOOLCHAIN_FEATURES="
+    as_dn_directive
     asm_mod_q
     attribute_may_alias
     attribute_packed
@@ -3767,6 +3768,11 @@ EOF
 
     check_inline_asm asm_mod_q '"add r0, %Q0, %R0" :: "r"((long long)0)'
 
+    check_as <<EOF && enable as_dn_directive
+ra .dn d0.i16
+.unreq ra
+EOF
+
     [ $target_os != win32 ] && enabled_all armv6t2 shared !pic && 
enable_weak_pic
 
 elif enabled mips; then
diff --git a/libavcodec/arm/vc1dsp_init_neon.c 
b/libavcodec/arm/vc1dsp_init_neon.c
index 912e33c..9ded7a2 100644
--- a/libavcodec/arm/vc1dsp_init_neon.c
+++ b/libavcodec/arm/vc1dsp_init_neon.c
@@ -22,6 +22,8 @@
 #include "libavcodec/vc1dsp.h"
 #include "vc1dsp.h"
 
+#include "config.h"
+
 void ff_vc1_inv_trans_8x8_neon(int16_t *block);
 void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, int linesize, int16_t *block);
 void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, int linesize, int16_t *block);
@@ -91,6 +93,7 @@ av_cold void ff_vc1dsp_init_neon(VC1DSPContext *dsp)
     dsp->vc1_inv_trans_4x4_dc = ff_vc1_inv_trans_4x4_dc_neon;
 
     dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_pixels8x8_neon;
+    if (HAVE_AS_DN_DIRECTIVE) {
     dsp->put_vc1_mspel_pixels_tab[ 1] = ff_put_vc1_mspel_mc10_neon;
     dsp->put_vc1_mspel_pixels_tab[ 2] = ff_put_vc1_mspel_mc20_neon;
     dsp->put_vc1_mspel_pixels_tab[ 3] = ff_put_vc1_mspel_mc30_neon;
@@ -106,6 +109,7 @@ av_cold void ff_vc1dsp_init_neon(VC1DSPContext *dsp)
     dsp->put_vc1_mspel_pixels_tab[13] = ff_put_vc1_mspel_mc13_neon;
     dsp->put_vc1_mspel_pixels_tab[14] = ff_put_vc1_mspel_mc23_neon;
     dsp->put_vc1_mspel_pixels_tab[15] = ff_put_vc1_mspel_mc33_neon;
+    }
 
     dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_neon;
     dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_neon;
diff --git a/libavcodec/arm/vc1dsp_neon.S b/libavcodec/arm/vc1dsp_neon.S
index d1b24cf..fa87ede 100644
--- a/libavcodec/arm/vc1dsp_neon.S
+++ b/libavcodec/arm/vc1dsp_neon.S
@@ -24,6 +24,8 @@
 #include "libavutil/arm/asm.S"
 #include "neon.S"
 
+#include "config.h"
+
 @ Transpose rows into columns of a matrix of 16-bit elements. For 4x4, pass
 @ double-word registers, for 8x4, pass quad-word registers.
 .macro transpose16 r0, r1, r2, r3
@@ -661,6 +663,7 @@ function ff_vc1_inv_trans_4x4_neon, export=1
         bx              lr
 endfunc
 
+#if HAVE_AS_DN_DIRECTIVE
 @ The absolute value of multiplication constants from vc1_mspel_filter and 
vc1_mspel_{ver,hor}_filter_16bits.
 @ The sign is embedded in the code below that carries out the multiplication 
(mspel_filter{,.16}).
 #define MSPEL_MODE_1_MUL_CONSTANTS  4 53 18 3
@@ -984,6 +987,7 @@ PUT_VC1_MSPEL_MC_V_ONLY(2)
 PUT_VC1_MSPEL_MC_V_ONLY(3)
 
 #undef PUT_VC1_MSPEL_MC_V_ONLY
+#endif
 
 function ff_put_pixels8x8_neon, export=1
         vld1.64         {d0}, [r1], r2
-- 
2.0.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to