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

Jason Garrett-Glaser jason
Fri Feb 4 13:37:31 CET 2011


On Fri, Feb 4, 2011 at 4:34 AM, Diego Biurrun <diego at biurrun.de> wrote:
> On Thu, Feb 03, 2011 at 11:37:58PM -0800, Jason Garrett-Glaser wrote:
>>
>> --- 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
>>
>> ? ? ?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);
>
> nit: Can you give operators a little more space to breathe? :)

Done locally.

Jason



More information about the ffmpeg-devel mailing list