[Ffmpeg-devel] [PATCH] simple internal lzo decoder
Reimar Döffinger
Reimar.Doeffinger
Tue Jan 10 23:23:12 CET 2006
Hi,
On Tue, Jan 10, 2006 at 11:08:08PM +0100, Michael Niedermayer wrote:
> On Tue, Jan 10, 2006 at 10:07:28PM +0100, Reimar D?ffinger wrote:
> [...]
> > +typedef struct LZOContext {
> > + uint8_t *in;
> > + int in_remain;
> > + uint8_t *out;
> > + int out_remain, out_size;
>
> wouldnt in_end and out_end lead to simpler code then the amount of bytes left?
I started with that but didn't like it. Maybe I'll give it another try.
> > + memcpy(c->out, c->in, cnt);
> > + c->in_remain -= cnt;
> > + c->out_remain -= cnt;
> > + do {
> > + *c->out++ = *c->in++;
> > + } while (--cnt);
>
> am i too tired or is this looking a little odd?
That's a little leftover - I removed the memcpy since it seems to be
mostly small amounts of data.
Greetings,
Reimar D?ffinger
More information about the ffmpeg-devel
mailing list