[FFmpeg-devel] [PATCH][RFC] Lagarith Decoder.
Måns Rullgård
mans
Sat Aug 22 11:09:08 CEST 2009
Nathan Caldwell <saintdev at gmail.com> writes:
> 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?
Why is this in a separate file anyway? Is it useful to other codecs?
>>> +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.
Hmm, there are some copying functions in lavu/avstring.[ch]...
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list