Hello,
On Mon, Jul 16, 2007 at 12:25:14AM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
[...]
> >> +static void
> >> +copy_bytes(uint8_t *dst, uint8_t *src, unsigned int len)
> >> +{
> >> + while (len--)
> >> + *dst++ = *src++;
> >> +}
> >
> > i think we have such a copy routine somewhere already, but i dont remember
> > where
>> Reimar said it looked familiar too. Wherever it is, it's not in a
> central location. Where would be the appropriate place for a function
> like this?
It is in libavutil/lzo.c, but it is quite lzo specific since the
boundary checks are currently in the function, it assumes src and dst
are in the same memory area and for LZO a output buffer that is padded
by IIRC 12 additional bytes is necessary to get up to speed.
And the function is called copy_backptr.
Greetings,
Reimar D?ffinger