[FFmpeg-devel] libavcodec for iPhone

Måns Rullgård mans
Wed Mar 11 13:02:13 CET 2009


"Kvikant, Christian \(Scilla\)" <kvide at scilla.tv> writes:

> 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;
>  }

That is much slower.

Please try replacing the lsrle line with "movle %0, %2, lsr #1".  It's
possible the apple assembler hates the lsr pseudo-instruction.

>> 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...

Does it give any details at all?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list