[Ffmpeg-cvslog] r6604 - trunk/libavcodec/cabac.h

Uoti Urpala uoti.urpala
Tue Oct 10 04:05:32 CEST 2006


On Mon, 2006-10-09 at 17:52 +0200, michael wrote:

> drop failed attempt to optimize *state= c->mps_state[s];

> -        s+=2; //P3:631
> -        if(s<128)
> -            *state= s;


This version is faster:

	uint32_t tmp = -124 + s;
	tmp >>= 31;
	s += tmp * 2;
	*state = s;

(Adjusted from -126 to -124 because the tables changed since the s<128
check).

It's close enough to the mps_state version that it's hard to say with
100% certainty which one is faster.





More information about the ffmpeg-cvslog mailing list