[FFmpeg-cvslog] r9104 - trunk/libavcodec/huffyuv.c

Michael Niedermayer michaelni
Wed May 23 20:09:45 CEST 2007


Hi

On Wed, May 23, 2007 at 11:51:01AM -0600, Loren Merritt wrote:
> On Wed, 23 May 2007, Michael Niedermayer wrote:
> 
> > Hi
> >
> > On Wed, May 23, 2007 at 11:02:08AM +0200, lorenm wrote:
> >> Author: lorenm
> >> Date: Wed May 23 11:02:07 2007
> >> New Revision: 9104
> >>
> >> Log:
> >> merge huffman tables so that we read 2 symbols at a time. 30% faster huffyuv decoding.
> >>
> >>
> > [...]
> >> +static void generate_joint_tables(HYuvContext *s){
> >> +    // TODO modify init_vlc to allow sparse tables, and eliminate pix2_map
> >
> > init_vlc() does allow sparse tables (with bits=len=0), see h263data.h
> > inter_MCBPC_* for an example
> 
> Two problems with that:
> 
> Everything in 0..0xffff is a potential symbol here, but VLC_TYPE is 
> int16_t and some value needs to indicate invalid too.

symbols far away from 0 occur pretty rarely so maybe simply not adding
them to the 2symbol table would be a simple solution?
this could be limited to the 2nd symbol or done with both and a seperate
complete 1 symbol table could be used



> 
> Generating sparse tables of 200 real entries and 65336 dummy entries 
> takes 3e6 cycles/frame (15% of the total time), while generating dense 
> tables of 200 entries takes 1.8e5 cycles/frame (1% of the total time). 
> This would be alleviated if I could give init_vlc a list of the valid 
> symbols, rather than assuming symbol == array index.

iam not against a init_vlc_sparse() or someting like that which would
accept the tables in a more efficient way ...

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

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- 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-cvslog/attachments/20070523/a92083fe/attachment.pgp>



More information about the ffmpeg-cvslog mailing list