aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-14 02:19:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-14 02:19:58 +0200
commit58c03f6d7d6eabdbc25103e8229a06ddf3718bb9 (patch)
tree9796a7be60b1b305a4e0235ffde5ede275f740b8 /libavcodec/vp8.c
parent01d3ebaf219d83c0a70cdf9696ecb6b868e8a165 (diff)
parent9f54e461fecec7a97ec1b97ae4468135ea770609 (diff)
downloadffmpeg-58c03f6d7d6eabdbc25103e8229a06ddf3718bb9.tar.gz
Merge remote branch 'qatar/master'
* qatar/master: swscale: properly inline bits/endianness in yuv2yuvX16inC(). (We didnt pull the bug) swscale: fix clipping of 9/10bit YUV420P. Add av_clip_uintp2() function (our patch / duplicate) dfa: fix buffer overflow checks to avoid integer overflows. (our patch / duplicate) movenc: always write esds descriptor length using 4 bytes. (our patch / duplicate) ffmpeg: use parse_number_and_die() when it makes sense (No thanks) ffmpeg: get rid of the 'q' key schizofrenia Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index f10e43c9cf..6bef32973d 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -1329,9 +1329,7 @@ static av_always_inline void filter_level_for_mb(VP8Context *s, VP8Macroblock *m
filter_level += s->lf_delta.mode[mb->mode];
}
-/* Like av_clip for inputs 0 and max, where max is equal to (2^n-1) */
-#define POW2CLIP(x,max) (((x) & ~max) ? (-(x))>>31 & max : (x));
- filter_level = POW2CLIP(filter_level, 63);
+ filter_level = av_clip_uintp2(filter_level, 6);
interior_limit = filter_level;
if (s->filter.sharpness) {