This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
simplify asm mid_pred, as suggested by michaelni.
Originally committed as revision 6314 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Loren Merritt
18 years ago
parent
a4eb118a41
commit
7e611a0e8c
1 changed files
with
9 additions
and
10 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-10
libavutil/common.h
+ 9
- 10
libavutil/common.h
View File
@@ -236,18 +236,17 @@ static inline int av_log2_16bit(unsigned int v)
static inline int mid_pred(int a, int b, int c)
{
#if (defined(ARCH_X86) && __CPU__ >= 686 || defined(ARCH_X86_64)) && !defined(RUNTIME_CPUDETECT)
int i=
a, j=a
;
int i=
b
;
asm volatile(
"cmp %4, %2 \n\t"
"cmovg %4, %0 \n\t"
"cmovl %4, %1 \n\t"
"cmp %4, %3 \n\t"
"cmovg %3, %0 \n\t"
"cmp %2, %1 \n\t"
"cmovg %1, %0 \n\t"
"cmovg %2, %1 \n\t"
"cmp %3, %1 \n\t"
"cmovl %3, %1 \n\t"
"cmp %
3, %2
\n\t"
"cmov
l
%1, %0 \n\t"
:"+&r"(i), "+&r"(
j
)
:"r"(
a), "r"(
b), "r"(c)
"cmp %
1, %0
\n\t"
"cmov
g
%1, %0 \n\t"
:"+&r"(i), "+&r"(
a
)
:"r"(b), "r"(c)
);
return i;
#elif 0
Write
Preview
Loading…
Cancel
Save