[FFmpeg-cvslog] r9104 - trunk/libavcodec/huffyuv.c
Loren Merritt
lorenm
Wed May 23 19:51:01 CEST 2007
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.
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.
--Loren Merritt
More information about the ffmpeg-cvslog
mailing list