mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
VP8: faster filter_level clip
This commit is contained in:
parent
dd18c9a050
commit
a1b227bb53
@ -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.ref[mb->ref_frame];
|
||||||
filter_level += s->lf_delta.mode[mb->mode];
|
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;
|
interior_limit = filter_level;
|
||||||
if (s->filter.sharpness) {
|
if (s->filter.sharpness) {
|
||||||
|
Loading…
Reference in New Issue
Block a user