[XviD-devel] 10% speedup in decoder

Jim Hauxwell xvid-devel@xvid.org
Wed, 25 Dec 2002 01:34:01 -0000


Hi,

I've been doing some profiling with Rational Quantify to see what needs
doing whilst I'm off work.

Anyway, the first thing I have found is in decoder.c

			case MODE_DIRECT_NONE_MV:
				{
					const int64_t TRB = dec->time_pp - dec->time_bp, TRD = dec->time_pp;
					int i;

If you change the type from int64_t to int32_t you get a 10% speedup, as the
64bit types are not being emulated.

I have tried with a few test sequences and all seems OK, as well as a read
through looks like it shouldn't overflow/underflow with this reduced data
type.  The encoder uses 32bit representation for TRB so I think its safe to
change.

Jim