[FFmpeg-devel] [PATCH] Optimization of original IFF codec

Ronald S. Bultje rsbultje
Sun Apr 25 20:24:42 CEST 2010


Hi,

On Sun, Apr 25, 2010 at 2:16 PM, Sebastian Vater
<cdgs.basty at googlemail.com> wrote:
> So, hope it sastifies now your wishes ;)

> +            uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ];

No spaces.

> +            memset(row, 0, (avctx->width << 2));

No brackets.

> -                decodeplane32(row, buf, FFMIN(s->planesize, buf_end - buf), avctx->bits_per_coded_sample, plane);
[..]
> +                decodeplane32((uint32_t *) row, buf, FFMIN(s->planesize, buf_end - buf), avctx->bits_per_coded_sample, plane);

Why did you add the cast? Is that necessary?

> -                    int length;
> +                    unsigned length;

Wrong patch.

> -                    decodeplane32(row, s->planebuf, s->planesize, avctx->bits_per_coded_sample, plane);
[..]
> +                    decodeplane32((uint32_t *) row, s->planebuf, s->planesize, avctx->bits_per_coded_sample, plane);

Same as above (cast).

> +                uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ];
[..]
> +                uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ];

Same as above (spaces).

> -                int length;
> +                unsigned length;

Same as above (unsigned/int conversion).

Btw, your patches are definitely getting better, I think you're
getting the hang of it. We're just being anal for a little bit so you
learn to submit great patches instead of just "patches". You'll notice
it makes review of functional changes much easier, especially for
complex code. You're well underway!

Ronald



More information about the ffmpeg-devel mailing list