mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
fix ARMv6 FASTDIV for divisor <=2
Originally committed as revision 14481 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
22e7d9cc25
commit
c8fd5da42f
@ -150,7 +150,10 @@ extern const uint32_t ff_inverse[256];
|
|||||||
static inline av_const int FASTDIV(int a, int b)
|
static inline av_const int FASTDIV(int a, int b)
|
||||||
{
|
{
|
||||||
int r;
|
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;
|
return r;
|
||||||
}
|
}
|
||||||
#elif defined(ARCH_ARMV4L)
|
#elif defined(ARCH_ARMV4L)
|
||||||
|
Loading…
Reference in New Issue
Block a user