[XviD-devel] Hadamard Transform Thoughts

xvid-devel@xvid.org xvid-devel@xvid.org
Tue, 17 Sep 2002 00:55:28 -0400


Hi -

I just found out how to join this list after the forum disappeared. (at
least I guess I did if you get this)

I haven't been able to get to that link on the Hadamard transform but
have read the discussion in the list archives.  I was previously doing a
bit of thinking on the H26L Integer Transform and thought maybe some of
that would apply to MMXSSE code for Hadamard.

The thing I noticed was that the integer transform looked like a
Hadamard if the coefficients were all 1 or -1. But the Intel assembler
has a pavgb instruction that will calculate avg=(a+b)/2 for two vectors
of 8 1 byte values. It does this using 9 bit intermediate results,
rounding up.

But it seems to me that most of the results of Hadamard could maybe be
calculated as the different of 2 averages, each of 4 terms, for instance

	 avg(avg(a,b),avg(c,d)) - avg(avg(e,f),avg(g,h))

where, except for the subtraction, most of it would be done with fast
8x1 byte vectors. Because of the rounding this is only an approximation
but I thought it was interesting and might be good enough for your
purposes. I'm afraid I didn't follow the idea any further but thought
someone else might like to pursue it. Don't know if it would be faster.

- Tom