git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd18c9a
)
VP8: faster filter_level clip
author
Jason Garrett-Glaser
<jason@x264.com>
Fri, 4 Feb 2011 03:44:32 +0000
(19:44 -0800)
committer
Jason Garrett-Glaser
<jason@x264.com>
Fri, 4 Feb 2011 03:55:06 +0000
(19:55 -0800)
libavcodec/vp8.c
patch
|
blob
|
history
diff --git
a/libavcodec/vp8.c
b/libavcodec/vp8.c
index
bcf6237
..
1db57e4
100644
(file)
--- a/
libavcodec/vp8.c
+++ b/
libavcodec/vp8.c
@@
-1480,7
+1480,10
@@
static av_always_inline void filter_level_for_mb(VP8Context *s, VP8Macroblock *m
filter_level += s->lf_delta.ref[mb->ref_frame];
filter_level += s->lf_delta.mode[mb->mode];
}
- filter_level = av_clip(filter_level, 0, 63);
+
+/* 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);
interior_limit = filter_level;
if (s->filter.sharpness) {