aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/common.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-03-22 02:21:17 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-03-22 02:21:17 +0000
commit45870f57182db02053328ec3ae110b5116438d43 (patch)
tree55cedd9a23c9f569bb572894152b8ced09e62414 /libavcodec/common.h
parentdaa57641370d17af7c5d8d757d110027488182b8 (diff)
downloadffmpeg-45870f57182db02053328ec3ae110b5116438d43.tar.gz
new motion estimation (epzs) not complete yet but allready pretty good :)
unlimited mv search range minor bugfix in the mpeg4 header parser reset picture in gop counter if scene change is detected Originally committed as revision 344 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.h')
-rw-r--r--libavcodec/common.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h
index 4fd0fb9cc9..b8e457ae74 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -197,6 +197,7 @@ typedef struct GetBitContext {
int bit_cnt;
UINT8 *buf, *buf_ptr, *buf_end;
#endif
+ int size;
} GetBitContext;
typedef struct VLC {
@@ -787,6 +788,24 @@ static inline int av_log2(unsigned int v)
return n;
}
+/* median of 3 */
+static inline int mid_pred(int a, int b, int c)
+{
+ int vmin, vmax;
+ vmax = vmin = a;
+ if (b < vmin)
+ vmin = b;
+ else
+ vmax = b;
+
+ if (c < vmin)
+ vmin = c;
+ else if (c > vmax)
+ vmax = c;
+
+ return a + b + c - vmin - vmax;
+}
+
/* memory */
void *av_mallocz(int size);