[FFmpeg-cvslog] r16395 - in trunk/libavcodec/arm: asm.S h264idct_neon.S simple_idct_neon.S

mru subversion
Tue Dec 30 04:13:53 CET 2008


Author: mru
Date: Tue Dec 30 04:13:52 2008
New Revision: 16395

Log:
ARM: work around linker bug with movw/movt relocations in shared libs

Modified:
   trunk/libavcodec/arm/asm.S
   trunk/libavcodec/arm/h264idct_neon.S
   trunk/libavcodec/arm/simple_idct_neon.S

Modified: trunk/libavcodec/arm/asm.S
==============================================================================
--- trunk/libavcodec/arm/asm.S	Tue Dec 30 04:13:48 2008	(r16394)
+++ trunk/libavcodec/arm/asm.S	Tue Dec 30 04:13:52 2008	(r16395)
@@ -18,6 +18,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "config.h"
+
         .macro require8, val=1
         .eabi_attribute 24, \val
         .endm
@@ -34,3 +36,12 @@
         .func   \name
 \name:
         .endm
+
+        .macro movrel rd, val
+#if defined(HAVE_ARMV6T2) && !defined(CONFIG_SHARED)
+        movw            \rd, #:lower16:\val
+        movt            \rd, #:upper16:\val
+#else
+        ldr             \rd, =\val
+#endif
+        .endm

Modified: trunk/libavcodec/arm/h264idct_neon.S
==============================================================================
--- trunk/libavcodec/arm/h264idct_neon.S	Tue Dec 30 04:13:48 2008	(r16394)
+++ trunk/libavcodec/arm/h264idct_neon.S	Tue Dec 30 04:13:52 2008	(r16395)
@@ -103,8 +103,7 @@ function ff_h264_idct_add16_neon, export
         mov             r1,  r2
         mov             r2,  r3
         ldr             r6,  [sp, #24]
-        movw            r7,  #:lower16:scan8
-        movt            r7,  #:upper16:scan8
+        movrel          r7,  scan8
         mov             ip,  #16
 1:      ldrb            r8,  [r7], #1
         ldr             r0,  [r5], #4
@@ -131,8 +130,7 @@ function ff_h264_idct_add16intra_neon, e
         mov             r1,  r2
         mov             r2,  r3
         ldr             r6,  [sp, #24]
-        movw            r7,  #:lower16:scan8
-        movt            r7,  #:upper16:scan8
+        movrel          r7,  scan8
         mov             ip,  #16
 1:      ldrb            r8,  [r7], #1
         ldr             r0,  [r5], #4
@@ -157,8 +155,7 @@ function ff_h264_idct_add8_neon, export=
         add             r1,  r2,  #16*32
         mov             r2,  r3
         ldr             r6,  [sp, #32]
-        movw            r7,  #:lower16:scan8+16
-        movt            r7,  #:upper16:scan8+16
+        movrel          r7,  scan8+16
         mov             ip,  #8
 1:      ldrb            r8,  [r7], #1
         ldr             r0,  [r5], #4

Modified: trunk/libavcodec/arm/simple_idct_neon.S
==============================================================================
--- trunk/libavcodec/arm/simple_idct_neon.S	Tue Dec 30 04:13:48 2008	(r16394)
+++ trunk/libavcodec/arm/simple_idct_neon.S	Tue Dec 30 04:13:52 2008	(r16395)
@@ -239,8 +239,7 @@ idct_coeff_neon:
         pld             [\data]
         pld             [\data, #64]
         vpush           {d8-d15}
-        movw            r3, #:lower16:idct_coeff_neon
-        movt            r3, #:upper16:idct_coeff_neon
+        movrel          r3,  idct_coeff_neon
         vld1.64         {d0,d1}, [r3,:128]
         .endm
 




More information about the ffmpeg-cvslog mailing list