Commit 605fc814 authored by mru's avatar mru

ARM: optimised mid_pred()

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16819 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9e330199
...@@ -90,4 +90,22 @@ static inline av_const MUL16(int ra, int rb) ...@@ -90,4 +90,22 @@ static inline av_const MUL16(int ra, int rb)
#endif #endif
#define mid_pred mid_pred
static inline av_const int mid_pred(int a, int b, int c)
{
int m;
__asm__ volatile (
"mov %0, %2 \n\t"
"cmp %1, %2 \n\t"
"movgt %0, %1 \n\t"
"movgt %1, %2 \n\t"
"cmp %1, %3 \n\t"
"movle %1, %3 \n\t"
"cmp %0, %1 \n\t"
"movgt %0, %1 \n\t"
: "=&r"(m), "+r"(a)
: "r"(b), "r"(c));
return m;
}
#endif /* AVCODEC_ARM_MATHOPS_H */ #endif /* AVCODEC_ARM_MATHOPS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment