[FFmpeg-devel] [PATCH][RFC] Lagarith Decoder.

Nathan Caldwell saintdev
Fri Aug 21 22:56:12 CEST 2009


2009/8/21 M?ns Rullg?rd <mans at mansr.com>:
> Nathan Caldwell <saintdev at gmail.com> writes:
>> + * @file libavcodec/lagrange.c
>
> That filename makes it look like it has something to do with Lagrange,
> which appears not to be the case, at least not directly.

Would lagarithrac.c perhaps be better?

>> +static void lag_memset(uint8_t *s, uint8_t c, size_t n, int step)
>> +{
>> + ? ?int i;
>> + ? ?if (step == 1) {
>> + ? ? ? ?memset(s, c, n);
>> + ? ? ? ?return;
>> + ? ?}
>> +
>> + ? ?for (i = 0; i < n * step; i += step)
>> + ? ? ? ?s[i] = c;
>> +}
>> +
>> +static uint8_t *lag_memcpy(uint8_t *dest, const uint8_t *src, size_t n,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? int step)
>> +{
>> + ? ?int i;
>> + ? ?if (step == 1)
>> + ? ? ? ?return memcpy(dest, src, n);
>> +
>> + ? ?for (i = 0; i < n * step; i += step)
>> + ? ? ? ?dest[i] = src[i];
>> + ? ?return dest;
>> +}
>
> Those two functions look like they could be useful elsewhere. ?They
> should be placed in some common file for everybody to use.

Where would be the suggested place to put them? Just not that familiar
with the code layout, so I don't want to go and put them some place
where they really don't belong.


-- 
-Nathan Caldwell



More information about the ffmpeg-devel mailing list