diff options
author | Måns Rullgård <mans@mansr.com> | 2008-07-31 06:38:40 +0400 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-07-31 06:38:40 +0400 |
commit | c8fd5da42fffc92268a0e23335af36580f2a2a4b (patch) | |
tree | e2a6b19c4d117ddeebe07fe08577e934170a7d8e /libavutil | |
parent | 22e7d9cc256a885657118291c8c8c16b47934c9c (diff) |
fix ARMv6 FASTDIV for divisor <=2
Originally committed as revision 14481 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/internal.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index 32db7f5d9b..4832ef1b22 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -150,7 +150,10 @@ extern const uint32_t ff_inverse[256]; static inline av_const int FASTDIV(int a, int b) { int r; - asm volatile("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(ff_inverse[b])); + 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; } #elif defined(ARCH_ARMV4L) |