[FFmpeg-devel] [PATCH] Use av_clip_uint8 in swscale.
Mon Aug 17 19:57:00 CEST 2009
Frank Barchard <fbarchard at google.com> writes:
> 2009/8/15 M?ns Rullg?rd <mans at mansr.com>
>> Michael Niedermayer <michaelni at gmx.at> writes:
>> > On Sat, Aug 15, 2009 at 05:53:49PM +0100, M?ns Rullg?rd wrote:
>> >> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
>> >> Depends on hardware. On processors with fast clipping instructions,
>> >> always clipping is likely to be faster.
>> > if they are fast enough, sure, but which cpu would that be?
>> ARM and AVR32 to name two.
> The table method works well on all platforms... better than if statements
Depends on the range of inputs. If you want to allow the full 32-bit
range, well... Even a smaller range could put significant pressure on
> On x86, there is cmov, but in the above code it would take cmp, cmov, cmp,
> cmov to do each value, whereas the table method takes one mov instruction.
You're forgetting the address calculation.
mans at mansr.com
More information about the ffmpeg-devel