[FFmpeg-devel] [PATCH] VP8: slightly faster loopfilter sharpness logic

Jason Garrett-Glaser jason
Fri Feb 4 13:55:49 CET 2011


On Fri, Feb 4, 2011 at 4:46 AM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> Hi,
>
> On Fri, Feb 4, 2011 at 2:37 AM, Jason Garrett-Glaser <jason at x264.com> wrote:
>> ---
>> ?libavcodec/vp8.c | ? ?2 +-
>> ?1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
>> index dce090f..c714f0e 100644
>> --- a/libavcodec/vp8.c
>> +++ b/libavcodec/vp8.c
>> @@ -1487,7 +1487,7 @@ static av_always_inline void filter_level_for_mb(VP8Context *s, VP8Macroblock *m
>>
>> ? ? interior_limit = filter_level;
>> ? ? if (s->filter.sharpness) {
>> - ? ? ? ?interior_limit >>= s->filter.sharpness > 4 ? 2 : 1;
>> + ? ? ? ?interior_limit >>= (s->filter.sharpness+3)>>2;
>> ? ? ? ? interior_limit = FFMIN(interior_limit, 9 - s->filter.sharpness);
>> ? ? }
>> ? ? interior_limit = FFMAX(interior_limit, 1);
>> --
>> 1.7.3.2.451.g1c2ab.dirty
>
> Hm, I guess that would be slightly faster, OK for me.
>
> Ronald
>

Applied.

Jason



More information about the ffmpeg-devel mailing list