[FFmpeg-devel] [Patch] QT RLE encoder, bis

Alexis Ballier alexis.ballier
Fri Jun 29 20:01:22 CEST 2007


Hi,

> > I didn't know if you prefered 4 spaces indentation or better
> > alignment, I assumed 4 spaces had preference
>
> if (!s->frame.key_frame && !memcmp(this_line, prev_line, s->pixel_size))
>     skipcount = FFMIN(skipcount + 1, MAX_RLE_SKIP);
> else
>     skipcount = 0;
>
> 4 space and aligned, sadly its 1 line longer

perfect

> [...]
> > +    s->length_table  = av_mallocz(s->avctx->width*sizeof(int));
[...]
> > +
> > +    s->length_table[width] = 0;
>
> isnt the table just width entries long?


Nice catch, I don't know why I messed up with this, length_table
should have size width+1 and rlecode_table only width... *very*
suprisingly I didnt hit any problem even with that bug and the results
are the same...


> [...]
> > +    this_line = p->data[0] + line*p->linesize[0];
> > +    prev_line = s->previous_frame.data[0] + line*p->linesize[0];
>
> this_line = p->               data[0] + line*p->linesize[0];
> prev_line = s->previous_frame.data[0] + line*p->linesize[0];


More readable, but having spaces after the "->" seems weird to me,
anyway changed as you suggested

> > +    bytestream_put_byte(&buf, 0);                     // zero skip code = frame finished
> > +    AV_WB32(orig_buf, buf - orig_buf);      // patch the chunk size
>
> the // could be aligned vertically

done


btw, removing parentheses around && and || gave me this warning :
qtrleenc.c:257: warning: suggest parentheses around && within ||

seems that it can be safely ignored


Regards,

Alexis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtrle_encoder_try5.patch
Type: text/x-patch
Size: 14022 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070629/cfe606f3/attachment.bin>



More information about the ffmpeg-devel mailing list