Aug 27, 2020, 10:17 by barsn...@gmx.net:

> On Wed, Aug 26, 2020 at 16:31:46 +0000, Anamitra Ghorui wrote:
>
>> >> +uint8_t ff_flif16_rac_read_bit(FLIF16RangeCoder *rc,
>> >> +                               uint8_t *target)
>> >> +{
>> >> +    return ff_flif16_rac_get(rc, rc->range >> 1, target);
>> >> +}
>> >
>> > If this is called often, you may want to mark it inline.
>> >
>>
>> On Nicolas George's suggestion, I had dropped the inline keyword because
>> the number of inline functions used may put stress on the memory cache.
>> I think I should only inine the "higher" functions and not the "lower"
>> functions like ff_flif16_rac_get in this case. Should I?
>>
>
> Ah, okay, I did read Nicolas's reviews, but I didn't recall this.
> Please do go with his suggestions.
>

We always inline bitstream reading functions, and this one is no different.
Its really necessary for speed, and well worth the additional binary size.
There's no memory cache gains to be had here, not with the huge
several hundred instruction lookaheads modern CPUs have had for decades,
just function call overhead and stack spillage to be saved on.
If we could only put av_always_inline on a single type of function in decoders,
it would have to be in bitstream reading, so please use that here.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to