Hi,

2011/5/26 Måns Rullgård <[email protected]>:
> "Ronald S. Bultje" <[email protected]> writes:
>> 2011/5/26 Måns Rullgård <[email protected]>:
>>> "Ronald S. Bultje" <[email protected]> writes:
>>>> On Thu, May 26, 2011 at 9:22 AM, Kostya <[email protected]> wrote:
>>>>> On Thu, May 26, 2011 at 09:18:29AM -0400, Ronald S. Bultje wrote:
>>>>>> ---
>>>>>>  libswscale/swscale_template.c |   20 +++-----------------
>>>>>>  1 files changed, 3 insertions(+), 17 deletions(-)
>>>>>
>>>>> looks ok (though LUT may be even better)
>>>>
>>>> The code currently uses av_clip_uint8() everywhere. I'll look into
>>>> converting it to cm[].
>>>
>>> Incidentally, av_clip_uint8 is much faster than a table on ARM...
>>
>> How about av_clip_uint8_fast_init(), which on arm is empty and on x86
>> is const uint8_t *cm = bla + tbl_off;
>
> Is there any advantage to having a local variable pointing into the clip
> table?  Making it global would avoid the need for an init step.

You can make it part of av_clip_uint8_bla(), i.e. #define
av_clip_uint8_bla(input_val) global_clip_table[input_val +
zero_offset]. I don't see how it would hurt on x86 (it doesn't add
instructions), so that's probably fine also.

>> and av_clip_uint8_fast() which on arm is av_clip_uint8() and on x86
>> is cm[]?
>
> _fast suffixes are stupid.  In this case, what you really mean is
> restricted input range.

Well function name isn't that important to me. Anyone up for implementing this?

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to