Mercurial > libavcodec.hg
diff common.h @ 277:5cb2978e701f libavcodec
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
author | michaelni |
---|---|
date | Fri, 22 Mar 2002 02:21:17 +0000 |
parents | 28c5c62b1c4c |
children | 2899263586cd |
line wrap: on
line diff
--- a/common.h Wed Mar 20 11:16:07 2002 +0000 +++ b/common.h Fri Mar 22 02:21:17 2002 +0000 @@ -197,6 +197,7 @@ int bit_cnt; UINT8 *buf, *buf_ptr, *buf_end; #endif + int size; } GetBitContext; typedef struct VLC { @@ -787,6 +788,24 @@ 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);