[Ffmpeg-devel] lzw compression in tiff encoder (qualification task for GSoC)
Michael Niedermayer
michaelni
Sat Apr 7 14:50:21 CEST 2007
Hi
On Sat, Apr 07, 2007 at 02:33:00PM +0200, Bartlomiej Wolowiec wrote:
> Hi,
> On Saturday 07 April 2007 01:50, Michael Niedermayer wrote:
> > > +/**
> > > + * Init LZW encoder (allocate memory)
> > > + * @param s LZW state
> > > + */
> > > +void ff_lzw_encode_open(LZWEncodeState ** s){
> > > + *s = av_malloc(sizeof(LZWEncodeState));
> > > + (*s)->tab = av_malloc(LZW_HASH_SIZE * sizeof(Code));
> > > +}
> >
> > why _init and _open ? it seems one would be enough
>
> I've changed functions _open/_close to _alloc/_free. I use _alloc/_init
> functions, because allocated memory can be used many times (e.g. in TIFF
> encoder can compress every strip separately).
could you post benchmarks (START/STOP_TIMER) if its faster by a non neglgible
amount iam ok with it, though maybe exporting the size and letting the user
allocate it like md5.c doex:
const int av_md5_size= sizeof(AVMD5);
would be simpler and more flexible?
[....]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The educated differ from the uneducated as much as the living from the
dead. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070407/bdc8e7bd/attachment.pgp>
More information about the ffmpeg-devel
mailing list