[Ffmpeg-devel] [RFC] smallcpy for h264
Luca Barbato
lu_zero
Sat Oct 7 11:12:02 CEST 2006
Siarhei Siamashka wrote:
> On Saturday 07 October 2006 05:11, Luca Barbato wrote:
>
>> here a pretty dumb patch that happens to work nicely on my system,
>> probably a better solution should be avoding memcpy.
>
> ff_smallcpy_n in the patch assumes that size is divisible by 16, is it ok?
there is a comment about it and is done on purpose (on ppc I'm using
altivec for it)
>
> A small suggestion is to probably have no return type for these functions as
> it is not used in ffmpeg anyway.
I'll update it soon
> It will make implementation a bit simplier
> and faster (no need to save destination buffer address in a register or stack
> for returning it later).
> Also an option for having direct calls instead of
> function pointer calls would be good to have in order to reduce call overhead.
I was thinking about either adding it as macro instead of dsputil in
order to cut the overhead since those function should be few lines of asm.
>
> Nevertheless aligning buffers at 16 byte boundary is a good idea and having
> some special redefineable functions to handle special buffer address
> alignment/buffer size cases can help to improve performance on some
> architectures (especially for those which require strict alignment).
That was the idea, still I'm unsure which is the better method.
--
Luca Barbato
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero
More information about the ffmpeg-devel
mailing list