[FFmpeg-devel] [PATCH] Mimic decoder

Michael Niedermayer michaelni
Sun Mar 16 20:31:01 CET 2008


On Sun, Mar 16, 2008 at 04:26:55PM -0300, Ramiro Polla wrote:
> Hello Michael,
> 
> Michael Niedermayer wrote:
> > On Sat, Mar 15, 2008 at 11:48:00PM -0300, Ramiro Polla wrote:
> > [...]
> >>     int8_t vlcdec_lookup[8][128];
> > 
> > int8_t vlcdec_lookup[9][64]
> > 
> > is large enough
> 
> The maximum num_bits is 7, so the largest value is 127.
> 
> vlcdec_lookup[7] has 128 symbols. That way, it'd have to read 
> vlcdec_lookup[8][64] as vlcdec_lookup[7][128], which I don't think is a 
> good idea.

There is no [8][64] or [7][128]
There is a [7][127] though
My suggestion safes almost 50% memory and it also should be faster due to
better use of the cache.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080316/32019a7e/attachment.pgp>



More information about the ffmpeg-devel mailing list