[FFmpeg-devel] libavcodec for iPhone

Kvikant, Christian Scilla kvide
Wed Mar 11 12:52:37 CET 2009


M?ns wrote:
>
> What is the problem with FASTDIV?
>

"lsrle". It's in the last hunk of ffmpeg4iphone-svn-2009-30-01-v0.0.4.patch

@@ -141,14 +141,14 @@
 #elif HAVE_ARMV6
 static inline av_const int FASTDIV(int a, int b)
 {
-    int r, t;
-    __asm__ volatile("cmp     %3, #2               \n\t"
-                     "ldr     %1, [%4, %3, lsl #2] \n\t"
-                     "lsrle   %0, %2, #1           \n\t"
-                     "smmulgt %0, %1, %2           \n\t"
-                     : "=&r"(r), "=&r"(t) : "r"(a), "r"(b),
"r"(ff_inverse));
+    int r;
+    __asm__ volatile("cmp   %2, #0        \n\t"
+                 "smmul %0, %1, %2    \n\t"
+                 "rsblt %0, %0, #0    \n\t"
+                 : "=r"(r) : "r"(a), "r"(ff_inverse[b]));
     return r;
 }

>
> I don't see anything that would need relocations there.  
> Do you have some more details?
>

Well, neither did I but iPhone's dyld just chokes on it while loading the
dylib... I'll try to clean up and post our simplified version later today.


>
> I don't know what the gstreamer approach is.
> Could you elaborate?
>

We've implemented a media player on top of GStreamer. It uses dedicated
audio and video sinks built against the official iPhone SDK. Lots of
assembler to cope with the fact that we can't use the same rendering API's
that are available on jailbreaked devices (e.g. CoreSurface).


Mvh,
Christian





More information about the ffmpeg-devel mailing list