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

Michael Niedermayer michaelni
Mon Apr 26 01:38:51 CEST 2010


On Mon, Apr 26, 2010 at 12:19:28AM +0200, Sebastian Vater wrote:
> Hi Michael!
> 
> Michael Niedermayer a ?crit :
> > On Sun, Apr 25, 2010 at 01:49:54PM +0200, Sebastian Vater wrote:
> >   
> >>> that loop then can be unrolled by a factor of 4 and its inside for the
> >>> uint8_t type case be implemented like:
> >>>     v= lut[get_bits(&gb, 4)];
> >>>     AV_WN32A(dst+b, AV_RN32A(dst+b) | v);
> >>>   
> >>>       
> >> The thing is that type can be both uint8_t and uint32_t. It's a #define
> >> macro which gets the type (uint8_t or uint32_t) passed by.
> >>
> >> So not fixed yet because I'm unsure here, if those two lines can be done
> >> with dst being uint32_t also.
> >>     
> >
> > they can, and it will speed the uint8 case up significantly
> >   
> When I understand you right, I have to create a lookup table the
> following way:
> For each of the 4-pair read bits:
> {0000 = 0, 0001 = 1 << plane, 0010 = 0x100 << plane, 0011 = (1 << plane)
> | (0x100 << plane), 0100 = (0x10000 << plane), ...}
> 
> Is that correct?

yes, with endianness correct

[...]
-- 
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/20100426/58280dbd/attachment.pgp>



More information about the ffmpeg-devel mailing list