Revision 199436b9 libavcodec/mathops.h
libavcodec/mathops.h  

83  83 
# define MLS16(rt, ra, rb) ((rt) = (ra) * (rb)) 
84  84 
#endif 
85  85  
86 
/* median of 3 */ 

87 
#ifndef mid_pred 

88 
#define mid_pred mid_pred 

89 
static inline av_const int mid_pred(int a, int b, int c) 

90 
{ 

91 
#if 0 

92 
int t= (ab)&((ab)>>31); 

93 
a=t; 

94 
b+=t; 

95 
b= (bc)&((bc)>>31); 

96 
b+= (ab)&((ab)>>31); 

97  
98 
return b; 

99 
#else 

100 
if(a>b){ 

101 
if(c>b){ 

102 
if(c>a) b=a; 

103 
else b=c; 

104 
} 

105 
}else{ 

106 
if(b>c){ 

107 
if(c>a) b=c; 

108 
else b=a; 

109 
} 

110 
} 

111 
return b; 

112 
#endif 

113 
} 

114 
#endif 

115  
86  116 
#endif /* AVCODEC_MATHOPS_H */ 
87  117 
Also available in: Unified diff