[Ffmpeg-devel] tiff encoder (qualification task for GSoC)

Alex Beregszaszi alex
Sat Mar 24 00:20:44 CET 2007


Hi,

> > > also this should rather use targa_encode_rle() (if needed with extending
> > > targa_encode_rle() to support any differences tiff requires)
> > 
> > It will be nice to have general RLE engine for all encoders, for example
> > there could be just one function ff_rle(uint8_t *src, int size, int *type)
> > which will return length of recognized serie and type (0=raw, 1=run)
> 
> the sign of the return could indicate raw/run ...

What about search_rle(uint8_t *src, int size, int maxrun, int maxstore)

which tries at most maxrun number of bytes for run and maxstore number
of bytes for raw. The return value indicates the number of bytes, either
negative, that means raw or positive means a run.

It just works on blocks, if it found an appropriate run or count, it
returns.

Also it would be nice indicating the data width, thus it could support
operating on 'pixels' for some obscure codecs, where pixel can mean 16
or even 24 bits instead the standard 8bit data width.

--
Alex Beregszaszi






More information about the ffmpeg-devel mailing list